How to retrieve the values of dropdowns after making selections?
Forms can be created in Studio using UiPath.Form.Activities. Controls inside the form can be textbox, dropdown, etc. How to bind values to drop downs?
Drop downs accept the following types as input:
- String[]
- List
- Dictionary
Preferred types are List and Dictionary only.
Follow the below example to know how to bind data to a drop-down.,
- Click on the Edit button of the drop-down
- It opens up a pop-up window. Navigate to the Field Key tab and grab Property Name
- Close the Form and click on FormFieldsCollection property of the activity.
Create an In argument with Property Name.
Bind it to a variable that already holds a value.
Based on the above example, the argument name should be select.
I'm using List type variable drop to bind the value.
Bind it to a variable that already holds a value.
Based on the above example, the argument name should be select.
I'm using List type variable drop to bind the value.
- Create a variable for FormFieldsOutputData property that holds the data passed to the form fields.
- Run the process in Studio and make a selection in the form.
- Clicking on Submit button closes the form and retrieves the value in a variable (JSON format) created in Step #4.
- Retrieved JSON string can be parsed using the below code to store each selected value inside a variable