Using Checkboxes Dynamically

SKIP AHEAD TO 
Instructions

Instructions

In this example, there is:

  1. A list of asset category to be selected by a client;
  2. A prompt for users to clarify how many of each asset type they have;
  3. For each asset in each asset category, they will be asked to declare which state jurisdiction the asset falls under.

You will create an application which: 

  1. Let users choose from a pre-defined list of checkboxes;
  2. Merge the checkboxes into one list;
  3. Filter this list of checkboxes;
  4. For each selected checkbox, run the same test for each checkbox

Step 1: Use a form and use checkboxes to define asset type.

1.PNG

Step 2: Connect the form page to the 1st merge function you will use to complete this process

2.PNG

Step 3: In the Property Editor of the merge function (located on the right), click "+output set" to create an output set and then add every checkbox reference variable by clicking "+add variable" to add each checkbox thereafter, within that one output set.

Purpose: Creating a collated LIST (in this example LIST25) of the Assets because they were individual checkboxes before.
 
The next step will involve merging the values of those assets (i.e. if the customers have checked the boxes)

Note: Your checkbox reference codes (e.g. "CBX16") may be different to the example, remember to reference the CBX corresponding to your studio.
 
For this example, the "List of Asset names" is LIST25. Please note, this may differ in your studio.

3.PNG

Step 4: Drag in a 2nd merge function and connect it to the 1st merge function

4.PNG

Step 5: Similar to Step 3, in the property editor of the editor, add every single checkbox, but this time, select property "value type" to be Value and not label.

Purpose: Creating a LIST of the answers of the checkbox selections. In this list, there is a LIST of TRUEs and FALSEs chronologically corresponding to the checkbox selections.
 
In the next step, we will filter the checkboxes that were selected.
 
For this example, the "List of selected checkboxes" is LIST24. Please note, this may differ in your studio.
 
5.PNG
 
Step 6: Drag in a filter function and connect it to the 2nd merge function
 
6.PNG
 
Step 7: In the property editor of the filter function:
1. (In RED) In filter condition, put "List of checkboxes" and put the condition "==TRUE" to only take checkboxes that were ticked (i.e. TRUE).
In this example, it is LIST24.
Note: "TRUE" must be in all caps here
 
2. (In BLUE) Put the "List of assets" in. The filter function will check each checkbox and if it is true, it will save that asset.
In this example, that list is LIST25.
 
3. (In GREEN) Afterwards, a List of Assets that were ticked off by the client is generated.
In this example, that list is LIST26.
 
7.PNG
A list of assets that were selected by the user has been generated.
 
Now, we want to verify how many assets of each asset class the client has.
 
Step 8: Drag in a LOOP function and within it, drag a Table page. Connect the nodes up accordingly.
 
8.PNG
 
Step 9: Click the Table and fill out the following.
 
Please note the following: 
- Row 3 is user generated.
For Cell B2 and C2, select DROPDOWN, and for both cells include all states (in this example, all Australian states)
- {{LP12_VAL1}} is specific to this example, and a contextual reference code that will be generated in the next step.
 
9.PNG
 
Step 10: Go back to Studio and click on the LOOP function and edit property editor as such.
 
Here's what each part means:
 
INPUT SET:
1) We are telling the LOOP to go through each asset in LIST26LP12_VAL1 which we referenced in the previous step, will replaced with each item of LIST26 one-by-one, as it repeats itself in the LOOP. A visual is shown in the next step.
 
2) Output sets refer to variables that will be outputted each run. Since Cell B2 refers to the "No. of assets", and Cell C2 refers to a dropdown selection of states, each time we run through each asset, the platform will record that assets: number and state. You can reference these later using LP12_SET1 and LP12_SET2 respectively.
 
10.PNG
 
 
The following is a series of snapshots showing a run through of this build:
 
11.PNG
 
12.PNG

13.PNG

14.PNG