Add a form to bot

Adding an existing form to a bot enables users to collaborate with bots. Use the necessary action items to create a bot and build a task logic.

This task describes a scenario where you want to design a bot that triggers an existing New User Registration form. A Hot key preset trigger starts the bot. An existing form that is linked to the bot is displayed where the user enters the information.
  • If the user clicks Submit, a User Agreement form is displayed.
  • If the user clicks Cancel, User registration is canceled message is displayed and the bot is terminated.

Procedure

  1. On the left pane, click Automation.
    A list of available bots and forms is displayed.
  2. Click Create new > Bot.
  3. Enter a name for the bot.
    All the bots are stored in the \Bots folder. Click Browse to change the folder.
  4. Click Create & edit.
    The bot builder pane is displayed that has Flow (default view), List and Dual view. You can drag the required actions from the left pane to create a task.
  5. In Triggers > Hot key, drag Hot key trigger into Drag a trigger here in the bot logic.
  6. Set Ctrl and L as the hot key combination.
  7. Use the Search actions field to find Interactive forms.
  8. Drag Display into the task logic.
    You can use the display action to show the form when the bot is triggered. The display action properties appear on the right.
  9. Click the create variable icon (Create variable icon) to create a variable.
    You have to create a form variable by linking an existing form. This enables you to use the form variable and the associated form across multiple instances.
    Note: The form variable can be linked only to forms created using the Control Room form builder.
  10. On the Create variable screen, enter a name for the form variable you are creating.
  11. Click Browse and select the New User Registration form.
    This links the New User Registration form to the form variable that you are creating.
  12. Click Create & select.
    A new form variable is created. For any existing form variable, use the Form name drop-down menu to select it.
  13. Use the Search actions field to find Trigger loop and drag it to add event monitoring.
    Event monitoring enables you to simultaneously set multiple events within the task logic of a bot.
  14. Drag Handle into the Trigger loop.
    Handle enables you to run an action by configuring a trigger in the Trigger loop: Handle for the bot. You can set a trigger when a event occurs on the selected interface (selected application) or when a user clicks the selected form element.
  15. For this scenario, use the Trigger on drop-down menu to select INTERACTIVE FORMS > Form trigger.
  16. Click the Form name drop-down menu and select the New User Registration form.
    This enables you to set a trigger for the Submit option of the New User Registration form.
  17. Click the Form element drop-down menu and select Submit.
    For the Button element of a form, the Select action trigger is set to Clicked by default. When the user clicks Submit on the New User Registration form, it triggers the User Agreement form.
  18. (Optional) Use Assigned to to create a variable.

    You can use this variable to fetch various details for the element you have selected in the Form element drop-down menu. This return value is either a string or number based on the element type selected. For example, if you have selected the Date element, the return value is a string.

  19. Search for Interactive forms and drag Display into Trigger loop: Handle.
  20. Click the Form name drop-down menu and select User Agreement form.
    The User Agreement form appears.
  21. Search for Message and drag it into Trigger loop: Handle, after Interactive forms.
    A successful registration message appears when the user clicks Submit.
  22. Terminate the trigger by dragging Break into the Trigger loop.
    Use Break to exit the current event loop and for actions where finishing a process is required.
  23. Drag another Handle next to the Trigger loop: Handle.
    This enables you to set a trigger for the Cancel option of the New User Registration form.
  24. Click the Form element drop-down menu and select Cancel.
  25. Search for Message and drag it into Trigger loop: Handle. Update the Enter the message to display field as User registration is canceled.
    When the user clicks Cancel on the New User Registration form, it triggers a User registration is canceled message and terminates the bot.
  26. Drag Trigger Loop > Break to terminate the loop.
  27. Click Save.
  28. Click Run with triggers.
    The Run with triggers sets the Hot key trigger to start the bot, which is Ctrl plus L combination from the keyboard in this scenario.