I try to make a scripted fields with size of message field value. I tried
doc['message'].value.getSize()
doc['message'].value.size()
I tried also with ['message.keyword'] but nothing. I have [ ] in preview. Where am I wrong?
Thank you
Tryparams._source.message.length().
Related
Please tell me how to read Issue Fields like resolveProjectID & resolveTaskID:
****.workfront.com/attask/api/OPTASK/search?id=5bf801f101b144a12aabb51f2c068caa
returns:
{"data":
[{"ID":"5bf801f101b144a12aabb51f2c068caa",
"name":"test-dev-issue","objCode":"OPTASK",
"plannedCompletionDate":"2018-11-27T00:00:00:000+0200",
"status":"NEW",
"primaryAssignment":null}]
}
According to the API-Explorer guide (https://support.workfront.com/hc/en-us/articles/220633507-API-Explorer), resolveProjectID & resolveTaskID should be located within OPTASK fields. I couldn't find anything helpful yet within their documentation.
Thank you!
The search you're executing will work, but if you know the ID of the record you're retrieving then you should call it directly (/api/v9.0/OPTASK/5bf801f101b144a12aabb51f2c068caa).
The return value is, by default, a small set of fields providing some basic data. If you want more fields, add a parameter (fields=).
/people-search:(people:(id,first-name,last-name,date-of-birth,summary,industry,group-memberships,job-bookmarks,interests,associations,public-profile-url,picture-url,headline))?keyword=retail&count=500
the above search gets me all my connections when it is just suppost to get the ones in retail.
?keyword=cytdcytxyrtr4dftubiugiuguukjkjp
this does the same...
I am glad that I get 'a' result but why aren't params working?
I think it's "keywords" plural. Does that fix things?
I want to make some fields (checkboxes) readonly if the record is saved. the next assigned person can change in some fields. But some fields must be restricted that no body can change them. One way is to do so is to put user or group rights. But I want it in another way. Any way there?
This condition is work perfectly
<field name="freezing_on_all_channels" attrs="{'readonly':[('id','!=', False)]}"/>
or attrs="{'readonly':[('id','!=',0)]}" (note: the 0 not in quotes '0'),
you just made one mistake; if you put
<"field name="id" invisible="1"/> in the view as well, then it will work as expected.
Thanks
It's possible when state is change.
You can do it by writing "attrs={}" attribute in your .xml.
For example:
< field name="your_field" attrs="{'readonly':[('state','=','saved')]}"/>
Hope this will solve your problem.
Thank You...
try with below
'your_field': fields.char('Name', type='char',store=True,readonly=True),
In selection-screen, I have one parameter called 'Author' I have called the report using 'Submit' from other report and passed the value to 'Author'. Now I need to make the 'Author' parameter as Read-only. How can I do that?
I used the following code,
LOOP AT SCREEN.
IF SCREEN-NAME = 'author'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
EXIT.
ENDIF.
ENDLOOP.
But it is not working. Can any one help me in resolving this?
Put your code in the at selection-screen output-event.
Disclaimer: This answer does not answer exactly your question, but perhaps it is an easier solution for your need.
If you need only a parameter for SUBMIT you may use
PARAMETERS AUTHOR NO-DISPLAY.
The parameter will not be visible on selection screen, but it can be used via SUBMIT.
This is not a 'read-only' it is a 'don't show' parameter.
While form_set_error('field_firstname', t('message')); works fine, how can I do the same for one of several taxonomy fields? e.g. form_set_error('taxonomy[5]', t('message')); (which doesn't work). Can anyone help?
Found the answer. Here it is, for anyone who might have the same problem:
If the #parents property of your form element is array('foo', 'bar', 'baz') then you may set an error on 'foo' or 'foo][bar][baz'. Setting an error on 'foo' sets an error for every element where the #parents array starts with 'foo'.
So form_set_error('taxonomy][5', t('message')); works perfectly.