Add to Picklist Dynamically

 

Description

By default, a picklist field of type "Lookup", will display all the values present in the lookup field. The deluge add item task is used in on user input field action script and on load form action script, to add an item to a picklist/radio button/checkbox/multiselect lookup field. For example, in the SubmitFeedback form given below, each issue submitted is assigned to a specific team member belonging to a specific module. When a Modue is selected from the Module Name picklist, only those team members belonging to the selected module will be listed in the Assign To picklist. This is achieved using the <picklist fieldname>:ui.add(value) Deluge syntax.

Syntax

<picklist fieldname>:ui.add(value);

where,

<picklist fieldname> is the name of the picklist field in the current form.
<value> is the value to be added to the above picklist.

Note IconNote: You cannot import a picklist field into another form.

Example

Refer the following links for examples on creating dymanic picklist.

Getting Started with Deluge Scripting - Populating the AssignTo picklist field based on selected module
Tips & Tricks - Dynamic Picklist