Info |
---|
|
This routine is available since JJUPIN 3starting with Power Scripts™ v3.0.2 (server) and above. |
Info |
---|
title | Supported Custom Fields |
---|
|
Please note that this routine can only be used with: Select List (single choice), Select List (multiple choices), Checkboxes, Radiobuttons custom fields. If you wish to use this kind of functionality with Select List (cascading), consider using a custom cascading select field found in this tutorial: Create custom cascading select field. |
Syntax
lfAllowSelectOptions(field, options[, triggerChange])
Description
Excerpt |
---|
Restricts the list of given options of the field a field's selectable values to the list of options given as a parameter of the routine. |
Parameters
Parameter | Type | Required | Description |
---|
field | Stringstring | Yes | The field Field to restrict options for. |
options | Stringstring[] | 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
...
Example - restricting users to select certain values in the field options
Code Block |
---|
lfAllowSelectOptions("priority", {"MajorMedium", "MinorHigh"});
//where field = "priority" and options = "MajorMedium" and "MinorHigh" |
Image Added
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 |
---|
showSpace | false |
---|
sort | title |
---|
cql | label = "live_fieldslf_routines" |
---|
labels | jira_comment_routine |
---|
|