Example of using the Checkbox element dynamically
The Checkbox element in the AARI form enables you to select multiple options in a form during bot runtime. In this example, use the Checkbox element to generate dynamic options.
Prerequisiti
You must have a Bot Creator license and be assigned a custom role with create folder permission.
Procedura
- Log in to the Control Room as a Bot Creator user.
-
Create the initial form.
- On the left plane, click Automation.
- Click Create new > Form.
- Enter the form name employee_register_initial_form.
-
Enter the folder location Bots\Employee
Registration.
To change where your form is stored, click Choose and follow the prompts.
- Click Create & edit.
-
Use the following Elements and
Element label in the form.
Elements Element label TextBox Full Name Number ID Date Date of Joining Dropdown Gender For the Dropdown element, enter Male, Female in the Enter list items separated by commas field.
- Click Save.
- Click Close.
-
Create another form.
- In the same folder location, click Create new > Form.
- Enter the form name employee_location.
- Click Create & edit.
- Drag the Checkbox element into the form.
- Enter the name in the Element label field Employee location.
- Click the plus icon in the Checkbox content field and add the locations San Jose and Tokyo.
- Click Save.
- Click Close.
-
Create a new bot.
- In the same folder location, click Create new > Bot.
- Enter the bot name dynamic_checkbox.
- Click Create & edit.
-
Create the following variables:
- emp_id: Number type; use as input
- emp_location: List type, String subtype; use as output; click the plus and add two values San Jose and Tokyo
- emp_dyn_location: String type, add the default value India
The default values are San Jose and Tokyo but if the employee ID falls between 100 and 200, the location India is selected.
-
Use the If
action to configure the conditional statement.
- Double-click or drag the If action.
- Select Number from the Condition drop-down list.
- In the Source value field, insert the variable $emp_id$.
- Select Greater Than (>) as the Operator.
- Enter 100 in the Target value field.
- Click Add condition and select And.
- Select Number from the Condition drop-down list.
- In the Source value field, insert the variable $emp_id$.
- Select Less Than (<) as the Operator.
- Enter 200 in the Target value field.
- Click Save.
-
Use the