...
Info |
---|
|
This routine is available since JJUPIN starting with Power Scripts 3.0.2 version and above. |
Syntax
lfAllowSelectOptions(field, options[, triggerChange])
Description
Excerpt |
---|
Restricts the list of given options of the field to the list of options given as a parameter. |
Parameters
Parameter | Type | Required | Description |
---|
field | String | Yes | The field Field to restrict options for. |
options | String | Yes | The list List of remaining options. |
triggerChange | Boolean | No | If set to "true", it triggers the change event on the field when a routine is used. |
Example - restricting users to select certain values in the field options
The following code example restricts anything but "Major" and "Minor" from the options of the priority standard Priority field.
Code Block |
---|
lfAllowSelectOptions("priority", {"Major", "Minor"}); //where field = "priority" and options = "Major" and "Minor" |
If you want to trigger the change event on the field when using lfAllowSelectOptionsusing the lfAllowSelectOptions routine, you can use the optional triggerChange parameter set to true:
Code Block |
---|
lfAllowSelectOptions("customfield_10000", {"option1", "option2"}, true);
//where field = "customfield_10000" of type select list, options = "option1" and "option2" and triggerChange = true |
See Also
...
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 35 |
---|
cql | label = "live_fields_routines" |
---|
labels | jira_comment_routine |
---|
|