Statements > Client Side Functions > Add to Picklist Dynamically

Add to Picklist Dynamically

Tags:  

Add to Picklist Dynamically

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.

 


1 Comments  Show recent to old
craig.young, 212 - days ago  

I'm dynamically adding elements to a multi-select picklist using a custom button on a stateless form. I had assumed that the ui.add function would append to the current picklist. However, there seems to be an implicit Clear executed before the For Each loop. Is there any way to keep the entries in the picklist from a previous On Click when adding new ones?

Post a comment


 RSS of this page