Thanks for your reply, but the form is a form I have made using the Forms activity in UiPath. I would like to get the output of what the user checks in an array, so I can use it in a for each. I need to bind the FormFieldsCollection.
I cannot do this as the checkboxes are made in the Form Designer using the Create Form activity.
My question is how to get the output of each checkbox that the user selects in the Form using the select boxes field.
I think I read somewhere that the FormFieldsCollection has a output as dictionary, but not sure how it works exactly. I would like to end up with a list of the name of all true checkboxes that the user selects in the process.
Please use the FormFieldsOutputData property from the Create Form activity to retrieve the output of the supplied values to the Forms activity. The output value will be of string datatype that will be in a JSON format.
In your use case, we need to extract the company names that are selected during the execution. I have chosen SYD and BCS during the runtime and because of which the values of the selected checkboxes are returned as True in the above sample output.
You need to Parse the JSON content and fetch the values that are True. Attaching a sample xaml for your reference. PLMK if you have any clarifications. FormActivities-MultipleCheckboxes.xaml (18.5 KB)
I know this is an old thread, but it’s near the top of Google for uipath form select boxes variable type right now. I was trying to figure out what variable type to bind Select Boxes to. @Dominic 's answer is good, but I didn’t want to parse JSON, I wanted to bind directly to a variable like with my other form fields.
I found that you can also use FormFieldsCollection. The variable needs to be Out of type Dictionary<String, Boolean>:
The dictionary’s keys will be the values you set in the form designer. Say these are your labels and values:
Your dictionary’s keys will be apples, oranges, bananas. Its values will be True where checked and False where unchecked.
So, let’s say you bind to a variable named fruits. You can index into fruits to see whether the user checked Apples.
The above evaluates to False if the user didn’t check Apples and True if they did.