Activities
latest
false
Banner background image
Workflow Activities
Last updated Apr 22, 2024

Building Your First Form Action

This is a step-by-step tutorial for building your first Form Action with the UiPath Form Designer. This tutorial demonstrates how to create three generic Form Actions, containing information relevant to an accounting department. For each company name stored inside a data table, a Form Action is created.

Tutorial

To build a generic Form Action:

  1. Add a Build Data Table activity into your workflow.

    1. Click the DataTable... button and create a single column, of type String, and rename it as ClientName
    2. Add as many rows as you want, containing names of companies. For this example, the following names were added as rows: McUiPath Inc., MFC, and Doogle.
    3. Click the OK button.

    4. Inside the DataTable output property, press CTRL + k on your keyboard and create a String variable, named ClientNamesDataTable.


  2. Add a For Each Row in Data Table activity into your workflow.

    1. Inside the ForEach field, type row instead. The reason for this is that the word row is shorter and easier to use.
    2. Inside the In field, pass the DataTable variable. For this example, pass ClientNamesDataTable.


  3. Add a Create Form Task activity inside the body of the For Each Row in Data Table activity.

    1. Type a title for the Form Actions inside the TaskTitle property field. For this example, type in "Accounting - fill in info about client".
    2. Type a priority that you want the Form Actions to have inside the TaskPriority property field. For this example, type in TaskPriority.High.
    3. Open the FormData(Collection) window. Create an argument that passes the company names from the data table, to the form. For this example, create an argument with the following characteristics:

      Name

      Direction

      Type

      Value

      ClientName

      In

      String

      row("ClientName").ToString

      Note: The row("ClientName").ToString expression iterates through every row inside the ClientName column, from the ClientNamesDataTable.
    4. Deselect the GenerateInputFields checkbox, because this example involves manually adding form components.

  4. Click the Open Form Designer button.

    1. Add a Content component to your form. Change the Field Key to the name of the argument that you've passed into the form. For this example, change the Field Key to ClientName. This binds the data from each table row to the Content component.
      4.2. Add a Text Field component to your form. For this example, inside the Label field, type Industry.
      4.3. Add a Number component to your form. For this example, inside the Label field, type Revenue.
      4.4. Add a Radio component to your form. For this example, inside the Label field, type Rate the financial performance in the previous year. Inside the Description field, type in Where 1 equals "Modest" and 4 equals "Great". Inside the Data tab, add the following labels in the Values section:
    2. 1 - Modest
    3. 2 - Moderate
    4. 3 - Substantial
    5. 4 - Great.
  5. Add a Number component to your form. For this example, inside the Label field, type Long-term debt.
  6. Save the form.

Result

The result of this tutorial is three new Form Actions that appear in the Inbox tab, as Unassigned Actions.



Preview your first Form Action

To preview your form, click the Preview icon, in the Form Designer ribbon.



Sample workflow

To check the complete workflow or to have a future reference, download the XAML 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.