Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Add rules to form elements

  • Updated: 12/09/2021
    • Automation 360 v.x
    • Build
    • AARI

Add rules to form elements

Rules enable you to add conditional actions such as If, And/Or and Then to various elements in a form.

For the Checkbox and Radio Button elements, the rules are triggered only if the corresponding presets are selected. For example, if a form has two mutually exclusive options, such as Yes and No, the rules associated with these options are triggered only when you select one of the two options.
Note: Rules are not supported for the following elements:
  • Button
  • Dynamic Area
  • Hyperlink
  • Image
  • Select file
  • Select folder
  • Snapshot
  • Table
Consider a scenario where you are creating a user sign in/registration form. You can add a rule to one of the form elements to enable an option to sign in as an existing user, or register a first time user.

Procedure

  1. On the left pane, click Automation.
    A list of available bots and forms is displayed.
  2. Click Create new > Form.
  3. In the Create form page, enter a name for the new form.
    Forms are saved in the \Bots\ folder by default. (Optional) Click Choose to change the default folder.
  4. Click Create & edit.
  5. Drag the following elements into the form:
    • Dropdown: Enter 'Select user type' in the Element label field, and add 'Existing user' and 'New user' in the Add dropdown content field.
    • Text Box: Add two elements and name them as 'User name' and 'Register'.
    • Password: Add one element.
    • Button: Add two elements and name them as 'Save' and 'Cancel'.
  6. On the right pane, click Form rules > Add rule.
    You can use this option to add rules to the form elements. In this scenario, add two rules.
  7. For the Rule1, update the following fields:
    Rule 1 is applied when an existing user tries to sign in. If a user clicks Select user type > Existing user, then the Register text box will be disabled. Use the If menu to set the following conditions:
    1. Select user type as the element condition in the first drop-down menu.
    2. Choice is in the second drop-down menu.
    3. Existing user in the third drop-down menu.
    Use the Then menu to set the corresponding actions:
    1. Register text box in the first drop-down menu.
    2. Disable in the second drop-down menu.
  8. For the Rule2, update the following fields:
    Rule 2 is applied for a first time user. If a user clicks Select user type > New user, then the User name and Password text boxes will be disabled. Use the If menu to set the following conditions:
    1. Select user type as the element condition in the first drop-down menu.
    2. Choice is in the second drop-down menu.
    3. New user in the third drop-down menu.
    Use the Then menu to set the corresponding actions::
    1. User name text box in the first drop-down menu.
    2. Disable in the second drop-down menu.
    3. Password text box in the third drop-down menu.
    4. Disable in the fourth drop-down menu.
  9. Click Save.
    The new registration form is created and is ready to be linked to a bot.
Send Feedback