Workflow Activities
Last updated Jul 19, 2024

Real Time Forms

The Real Time Forms feature enables you to modify values in the form you are using without closing the form. This means variables linked to the form fields you are using can be easily modified without needing to close the workflow and then run it again.

To take advantage of this feature, drag and drop the desired activities inside the Do block of the Create Form activity. Configure the fields and buttons in the form to be linked to activities in the Do block.

Using Real Time Forms

Activities in the Do block execute against the fields of the form, both reading and writing data. These activities are triggered any time a button is clicked or, optionally, when the form is opened. While activities are being executed, the form remains open and editable for the end-user.

Triggering the Do Block

To trigger the activities in the Do block of the form, use buttons.

By default, a button triggers the Do loop and then closes the form.

To trigger the Do loop and keep the form open with refreshed values, add a custom property to the Field Key tab on the desired button with the key-value pair closeOnSubmit-false.

To see which button was used on a form, parse the SelectedButton property of the output object.

Updating Form Values

Values on the form can be updated by changing the corresponding variables within the Do block.


Let's create a simple form containing two components: Username and City:

  1. Drag and drop the Create Form activity in your sequence workflow.
  2. Open the Variables panel and create two global variables, one for each component.

  3. In the FormFieldsCollection property of the Create Form activity, add an In/Out argument of type String for each component, and reference them to the previously created global variables. In this way, the components are autogenerated in the form.

    To use the Real Time Forms feature, create buttons in the form that do not close the form once they are clicked (for example, an update button):
  4. Open the Form Designer.
  5. Drag and drop a Button component.
  6. Navigate to the Field Key tab of the button component. Under Custom Properties, add closeOnSubmit as a Key and set the Value to false.

    Pay attention to the name you set for the field key. This name is used to bind the component in the form and it is case sensitive.

    Once this button is created, you may use activities such as If to change values in real-time in the form or the database behind the form.
  7. To track the button the business user clicks, create a variable to store it: In the Properties panel of the Create Form activity > Output category > SelectedButton field, click to Create Variable for the button. As an alternative, use the CTRL + K keyboard shortcut to create the variable. The variable is also added to the Variables panel of the sequence workflow.
  8. Name your button variable (for example, btn).

    To use form-specific buttons in the If activity, reference them by using the btn = " ... " expression. Make sure to use the correct syntax depending of your chosen programming language (C# or VB.NET).

    In this example, to monitor the Update button in the form.

  9. Drag and drop the If activity in the Do block of the Create Form activity.
  10. In the Condition field, input the expression: btn = "{button_field_key_name}" if you are using VB.NET, and btn == "{button_field_key_name}" if you are using C#. Replace the {button_field_key_name} value with the one you set at step 6.

    Subsequently, you can create rules for this condition.

    For example, once the Update button is clicked, you want to display Database Updated in the Username field:
    • In the If activity > Then section, drag and drop the Assign activity.
    • In the To field of the Assign activity, enter the global variable used to reference the Username field of the form.
    • In the Value field, enter "Database Updated".

    Running the form now enables you to make changes in real-time, without having to close and reopen the form.

Sample Workflow

To check the complete workflow or to have a future reference, download the archived example

  • Tutorial
  • Sample Workflow

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.