Button handy |
---|
blank | true |
---|
color | #0052CC |
---|
name | Send Feedback |
---|
link | https://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=lfRestrictSelectOptions+-+15480502 |
---|
width | auto |
---|
|
Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | lfRestrictSelectOptions(field, options, [triggerChange]) | Package | | Alias | | Pkg Usage | | |
...
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
field | String | Yes | Field to restrict options for | options | String | Yes | List of options to restrict | triggerChange | Boolean | No | If set to true, it triggers the change event on the field when routine function is used. | |
Return Type
None
Example
The following code example restricts Major and Minor from the options of the standard Priority field.
Code Block |
---|
|
lfRestrictSelectOptions("priority", {"Major", "Minor"}); //where field = "priority" and options = "Major" and "Minor" |
If you want to trigger the change event on the field when using lfRestrictSelectOptions, you can use the optional triggerChange parameter set to "true".
Code Block |
---|
|
lfRestrictSelectOptions("customfield_10000", {"option1", "option2"}, true);
//where field = "customfield_10000" of type select list, options = "option1" and "option2" and triggerChange = true |
...