activities
latest
false
UiPath logo, featuring letters U and I in white
Workflow Activities
Last updated Nov 18, 2024

Building your first forms

This tutorial shows how to build forms used to collect user input, and based on it, perform other activities. For this example, whenever a user visits the uipath.com website, it is prompted with a form asking if they want to try the UiPath products for free. If the answer is yes, then the automation will create an account for the user, based on the email address they provide through the use of another form.
  1. Create a form that asks the user if they want to try UiPath products for free.
    1. Create a new Form file and name it Want to try uipath for free..
    2. Add a Label/Header component, and type Hey there! in the Content field.
    3. Add a Radio component, and set the Label as Do you want to try UiPath products for free?. Configure two values for it: Yes and No.
    4. Remember the Property Name of the Radio component, because we'll use it to map data back into the workflow. For this example, the Property Name is answer.
  2. In case a user doesn't want to try UiPath products for free, create a form that asks the user why they don't want that.
    1. Create a new Form file and name it Why don't you want to try uipath products for free.
    2. Add a Label/Header component and type Ok, we respect your decision! in the Content field.
    3. Add a Text Area component and set the Label as But before you leave, can you tell us why you don't want to try UiPath products for free?.
    4. If you want to map back into the workflow the reason why a user didn't want to try UiPath products for free, then remember the Property Name of the Text Area component.
  3. For the users that want to try UiPath products for free, create a form that prompts them to enter an email address to create an account.
    1. Create a new Form file and name it ask for user data.
    2. Add a Label/Header component and type Time to create a user account and an organziation! in the Content field.
    3. Add an Email component, to make sure that the email address the user types isn't submitted, unless it's in a valid format. Set the Label as What's the work email you want to create your account with?
  4. Create the Main file, that runs all triggers inside your project.
    1. Add a Use Browser/Application activity and indicate the target as the www.uipath.com website, to open the website before running the triggers.
    2. Add a Run Local Triggers activity to run all triggers from the project at the same time.
  5. Create another workflow named uipath website opened, to see if the user wants to try UiPath products for free and acting accordingly, based on their answer.
  6. Add an Application Event Trigger activity, indicate the target as the UiPath website header, Event as Appeared, and the Scheduling mode as One Time.
  7. Add a Show Form activity. For Select Form choose the Want to try uipath for free form.
    1. In the Arguments collection, add the following arguments to map the answer back into the workflow:
      KeyTypeDirectionValue
      answer (the Property Name of the Radio component) StringOutanswerValue (a variable to store the data)
      data.demoValue (the Property Name of the Radio component) StringIndemoValue (a variable to store the data)
      Note: If the element id is prefixed with data, the value goes into the formio data dictionary. You can then use it in the formio designer with the expressions of the form {{data.demoValue}}. You must define the binding data.demoValue argument in the HTML element of the Form file.
    2. Disable Continue Workflow execution, to await for the user's input before executing the other activities.
  8. Add an If activity, and set the Condition as answerUser.ToString = "yes" (the format of the condition is variable.ToString = "the value of the answer you want to place the condition on")
    1. Inside the Then block, add a Use Application/Browser activity.
    2. Add a Click activity inside of it and indicate the Try UiPath Free button.
    3. Add a Show Form activity, and select the ask for user data form, to ask for user's email address.
    4. Inside the Else block, add a Show Form activity and select the why don't you want try uipath products for free form, to see why the user didn't want to try the UiPath products.
Check out the results of the tutorial in the video below:

Workflow example

To follow the steps and try out the tutorial yourself, download the sample project here.

  • Workflow example

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.