UiPath Form with Checkboxes to be filled with multiple values

Hi
This could be achieved with some json manipulation. Current documentation for Form Activities Pack is very sparse and incomplete, probably there is a more convinient way, but the solution below has worked for me:
Here I am using Select Boxes element that can hold any number of checkboxes inside and aligns them horizontically (I have community UIPath and 1.1.6 version of Forms Activities Pack):

Basically, what we see on the form is rendered from a json that contains all information about each component (element) of the form. We can dynamically change part of that json from withtin logic tab of a component and the forms renderer will update components accordingy.
We can use advanced logic that will trigger an action that will dynamically update our checkboxes. In trigger part we check whether the Create From activity input argument that holds json for new checkboxes is not empty, and in actions part we use Merge Component Schema to dynamically create new checkboxes (basically what Merge Component Schema does it changes part of component’s (element’s) json and when json is changed renderer updates what we see on the form).

We can take a look at component’s json from edit menu and observe how forms renderer reacts to changes we make to component’s json:

Inside my workflow that creates the form with checkboxes, two arguments are passed to the Create Form activity, one holds the current states for checkboxes (true, false) that is binded with Select Boxes component’s values and the second is a json list of checkboxes. When Create Form activity executed, checkboxes are dynamically created and the values from the argument that holds current states for checkboxes assigned to the newly created checkboxes components. We can see what checkboxes were selected by user in FormFieldsOutputData output argument of Create Form activity:

6 Likes