How to use select boxes?

Hi,

I am trying to create a form with multiple checkboxes. Each box has a value the same as the name in below picture.

How do I bind the selected output from the user? What are the output? Dictionary, array? I’m not that strong in either of these things.

Ideally I need an array or list I can use in a for each as the underlying process needs to be done in the selected companies by the user.

Thanks a lot for your help!

/stch

Hi @stch
Arr_Company give it as string array={“SYS”,“SYD”,“BCI”,“BCS”,“BCN”,“HSV”,“HBI”}
for each item in Arr_Comp

Use Click activity where in the selector pass the aaname as item

Thanks
Ashwin S

1 Like

Hi @AshwinS2

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.

Hi @stch

Try to read this article hope this might be helpful to you.

cheers :smiley:

Happy learning :smiley:

Hi @pattyricarte

My question is regading the Forms activity. Maybe I misunderstand you, but I don’t see how I can use Get Attribute in this scenario.

Thanks.

Hi @stch

Use Get Attribute and set the property as checked and ensure you set a condition as
and another thing use it in then condition as get attribute and set the property as aaname

and then use write range activity to add the check box values

Thanks
Ashwin S

Hi @AshwinS2

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.

Thanks.

Hi @stch

Check this

Thanks
Ashwin S

Hello Steffan,

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.

Sample output:
image

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.
image

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)

Thanks and Regards,
Dominic

1 Like

This works! Thanks a lot @Dominic. :slight_smile: