Welcome to the Real-Time Forms Public Preview! We are excited you’ve joined the preview and would like to thank you in advance for your participation and feedback.
This initial set of activities allows you to transform your static forms into a dynamic tool that interacts with the end-user, letting robots and humans work together in-tandem to fill in the form with data.
Please tell us what you think below! Your feedback will be critical as we drive toward GA release targeted for April.
How to Install
Everything you need has been published to the ‘Official Feed’ in Studio. Please follow the steps below to install the package in UiPath Studio:
- Open Manage Packages in Studio and navigate to the All Packages feed on the left.
- Check ‘Include Prerelease’ checkbox
- Search for and install these 3 packages:
UiPath.Form.Activities
- Make sure to install or upgrade to the ‘preview’ versionUiPath.FormActivityLibrary
UiPath.FormActivityLibrary.Contracts
The Forms Activity with real-time capabilities should now be available in Studio. You can tell by dragging a Create Form activity into your canvas and verifying that it has a “Do” clause in it.
See how it works!
In this example, we take a look at how you can use the new Forms activity to build a look-up inside of a form.
Download the example workflow.
How to Use
This brand new Create Form activity adds a ‘Do’ block, which allows you to execute activities against the fields of the Form - both reading and writing data. You can have these activities triggered any time a button is clicked or, optionally, when the form is opened.
While activities are being executed, the Form will remain open and editable for the end-user.
New Properties
- ExecuteDoBlockFirst – If checked, the activities in the Do block will be executed when the form opens. Otherwise, they will only be executed when a button is clicked.
- Isolated – Please ensure this is checked when running the Form activity.
Button Component
Buttons are the key to triggering the activities in the Do block of the form. You can see which button has been pressed by parsing the ‘SelectedButton’ field in the output.
A quick example - Say you’ve added two buttons: “Update address” and “Validate name”, which will trigger specific activities. Here’s how you’d set that up:
- Create a new String variable within the ‘SelectedButton’ property. e.g. - “selectedButton”
-
Place a Switch activity in the ‘Do’ activity and update the following properties:
- Expression = selectedButton
- TypeArgument = String
-
Place the button field keys as different conditions, along with the activities you’d like to invoke when the button is clicked.
Important - By default, buttons will no longer close the form if there are activities in the ‘Do’ clause. To change a button into a ‘Submit’ button, you can add the following custom property to the ‘Field Key’ tab on a button: (closeOnSubmit, True)
Update Form Values
Values on the form can be updated by changing the corresponding variables within the ‘Do’ loop. For example, let’s create an email look-up in the form which will update the email field based on a provided name.
- Create a name Text Field for end-user input.
- Create an email form field that you would like the process to act on. Make note of the field key.
Note: Fields that are updated by the robot will overwrite any human input in those fields, so it is advised to disable those fields.
-
Save and close the form designer.
-
Add the name and email fields keys to the FormFieldsCollection property on the Create Form activity.
-
In the ‘Do’ block, add a Switch activity to look up the provided name. Use the Assign activity to assign the corresponding email addresses to the email variable.
-
Save and run the process. A form should appear with a name look-up. Type in any of the names from the Do loop, and click on the “Look up” button. The email field should now have the corresponding variable value as was assigned to the bound variable.