Dynamically set form values
This tutorial shows you how to dynamically pass multiple values into form components such as Drop-down Lists, Checkboxes, or Radio components.
Prerequisites
- Create a form containing an element that accepts multiple values. For example, add a Drop-down List.
- Create a multi-value variable (for example, a list of strings) to pass into the form.
Steps
Follow these steps to dynamically set form values for a multi-value component:
-
Identify the Field Key value of the component you want to pass multiple values to. You will use this as the name of the argument through which you will pass data.
-
Select the previously created form in one of these activities: Show Form, Set Form Values, Update Form Values.
-
Open the Arguments dictionary. You will notice that an entry has been automatically added for the multi-value element.
The key of this automatic entry matches the Field Key value of the component, and has the
.Itemssuffix appended. For example, if your Field Key value isgroceryList, the automatically added key would begroceryList.Items. -
In the Value field of the argument, pass the variable containing the multiple values you wish to pass into the form.
Figure 1. The Arguments dictionary containing a dynamic argument, containing the .Items suffix
