- Overview
- Callout
- Complex Scenarios
- Credentials
- Data Service
- Form
- Release notes
- Project compatibility
- Real Time Forms
- Updating form data
- Running forms using JavaScript
- Customizing Forms Using CSS
- Conditional components
- Adding multiple components on the same row in Columns
- Using the Data Table component
- Get File/Folder path
- Reading cell values from a Data Grid component
- Displaying PDF files
- Displaying images in forms
- Scrolling through Data Grids
- Using Dev Tools with forms
- Calculate form component values
- Managing dates in forms
- Opening hyperlinks inside forms
- Displaying a default tab in forms
- Displaying the full label of a component
- Searching long strings in drop-down lists
- About the pre 23.4 Form experience
- Project Compatibility
- Real Time Forms
- Dynamic Checkboxes
- Conditional Dropdowns
- Displaying a Default Tab
- Displaying Images
- Displaying PDF Files
- Displaying the Full Label
- Dynamic HTML Elements
- Managing Dates
- Searching Long Strings in Drop-downs
- Customizing Forms Using Local CSS Files
- Executing Do Block On Checkbox Change
- Customizing Columns Width
- Updating Form Data
- Resetting Collection Data
- Advanced Logic
- Executing Do Block on Dropdown Option Change
- Reading Cell Values From a Data Grid Component
- Conditional Components
- Scrolling Through Data Grid Components
- Using the Grid Component
- Dev Tools
- Calculated Value
- Dynamic Dropdowns
- Switching Tabs With Button Click
- Opening Hyperlinks Inside Form
- FTP
- IPC
- Persistence
- Release notes
- Project compatibility
- About the Persistence activity package
- Bulk Form Designer
- Start Job And Get Reference
- Wait for Job and Resume
- Add Queue Item And Get Reference
- Wait For Queue Item And Resume
- Wait for Form Task and Resume
- Resume After Delay
- Assign Tasks
- Create External Task
- Wait For External Task and Resume
- Complete Task
- Forward Task
- Get Form Tasks
- Get Task Data
- Add Task Comment
- Update Task Labels
- Create App Task
- Wait for App Task and Resume
- Working with App tasks
- Building Your First Form Action
- Advanced Controls for Drop-downs
- Embedding Objects in Form Actions
- Allowing Users to Upload Files to the Storage Bucket
- Adding Advanced Logic Using Java Script
- Setting a Default Tab
- Removing the Delete button from Edit Grid using custom CSS
- Customizing Edit Grid templates
- Using buttons to trigger custom logic
- Using an External Form Layout
- Dynamically expanding form components at runtime
- Sample Workflows
- Automation Ops Pipelines
- System
- Release notes
- About the System activity package
- Project compatibility
- RegEx Builder Wizard
- Is Text Matching
- Find Matching Patterns
- Modify Text
- Modify Date
- Replace Matching Patterns
- Text to Left/Right
- Add Data Column
- Add Data Row
- Build Data Table
- Clear Data Table
- Get Row Item
- Update Row Item
- Merge Data Table
- Output Data Table
- Remove Data Column
- Remove Data Row
- For Each Row in Data Table
- Generate Data Table From Text
- Create List
- Append Item to List
- Read List Item
- Update List Item
- Add Log Fields
- Comment Out / Disabled Activities
- Comment
- Change Type
- Log Message
- Remove Log Fields
- Invoke Com Method
- Format Value
- Lookup Data Table
- Filter Data Table
- Sort Data Table
- Remove Duplicate Rows
- Join Data Tables
- Report Status
- Append Line
- Compress/Zip Files
- Copy File
- Copy Folder
- Create Folder
- Create File
- Delete
- File Exists
- Folder Exists
- Extract/Unzip Files
- Wait for Download
- File Change Trigger
- For Each File in Folder
- For Each Folder in Folder
- Delete File
- Delete Folder
- Move File
- Move Folder
- Rename Folder
- Rename File
- Path Exists
- Read Text File
- Write Text File
- Get File Info
- Get Folder Info
- Get Processes
- Get Username/Password
- Kill Process
- Beep
- Get Environment Folder
- Get Environment Variable
- Invoke Power Shell
- Input Dialog
- Message Box
- Browse for File
- Browse for Folder
- Invoke VBScript
- Process End Trigger
- Process Start Trigger
- File Change Trigger V3
- Trigger Scope
- Repeat Number of Times
- Text to Upper/Lowercase
- Set Environment Variable
- For Each
- Break / Exit Loop
- Retry Scope
- Check True
- Check False
- Workflow Placeholder
- Invoke Workflow File
- Launch Workflow Interactive
- Invoke Code
- Continue / Skip Current
- Multiple Assign
- Invoke Process
- Run Parallel Process
- While
- Do While
- Repeat Number Of Times
- Raise Alert
- Orchestrator HTTP Request
- Get Asset
- Get Credential / Get Orchestrator Credential
- Set Asset
- Set Credential
- Get Jobs
- Get Current Job Info
- Start Job
- Stop Job
- Add Queue Item
- Add Transaction Item
- Delete Queue Items
- Get Queue Items
- Get Transaction Item
- Postpone Transaction Item
- Set Transaction Progress
- Set Transaction Status
- Should Stop
- Wait Queue Item
- Bulk Add Queue Items
- Write Storage Text
- Upload Storage File
- List Storage Files
- Read Storage Text
- Download Storage File
- Delete Storage File
- Custom Input
- Append Item to Collection
- Build Collection
- Collection to Data Table
- Exists in Collection
- Filter Collection
- Merge Collections
- Remove From Collection
- Reset Timer
- Resume Timer
- Start Timer
- Stop Timer
- Timeout Scope
- Manual Trigger
- When New Item Added to Queue
- Stop Local Triggers
- Run Local Triggers
- Repeat Trigger
- Time Trigger
- Disable Local Trigger
- Enable Local Trigger
- Notify Global Variable Changed
- Global Variable Changed Trigger
- Extract Text
- Find and Replace
- Return
- Extract Date and Time from Text
- Change Case for Text
- Add or Subtract from Date
- Download file from URL
- Format Date as Text
- Split Text
- Combine text
- AddDataRow
- AddQueueItem
- AddTransactionItem
- AppendLine
- BulkAddQueueItems
- ClearDataTable
- CompressZipFiles
- CopyFile
- CreateFile
- CreateFolder
- DeleteFileOrFolder
- DeleteQueueItems
- DeleteStorageFile
- DownloadStorageFile
- ExtractUnzipFiles
- FilterDataTable
- GetAsset
- GetCredential
- GetJobs
- GetQueueItem
- GetQueueItems
- GetResourceForLocalPath
- GetRowItem
- GetTransactionItem
- InvokeProcess
- JoinDataTables
- ListStorageFiles
- LookUpDataTable
- MergeDataTable
- MoveFile
- OrchestratorHTTPRequest
- OutputDataTable
- PathExists
- PostponeTransactionItem
- ReadStorageText
- ReadTextFile
- RemoveDataColumn
- RemoveDuplicateRows
- Replace
- SetAsset
- SetCredential
- SetTransactionProgress
- SetTransactionStatus
- SortDataTable
- StartJob
- StopJob
- UpdateRowItem
- UploadStorageFile
- WaitQueueItem
- WriteStorageText
- WriteTextFile
- Testing
- Release notes
- Project compatibility
- About the Testing activity package
- Project Settings
- Add Test Data Queue Item
- Address
- Attach Document
- Bulk Add Test Data Queue Items
- Delete Test Data Queue Items
- Get Test Data Queue Item
- Get Test Data Queue Items
- Given Name
- Last Name
- Random Date
- Random Number
- Random String
- Random Value
- Verify Control Attribute
- Verify Expression
- Verify Expression With Operator
- Verify Range
- Address
- AddTestDataQueueItem
- AttachDocument
- BulkAddTestDataQueueItems
- DeleteTestDataQueueItems
- GetTestDataQueueItem
- GetTestDataQueueItems
- GivenName
- LastName
- RandomDate
- RandomNumber
- RandomString
- RandomValue
- VerifyAreEqual
- VerifyAreNotEqual
- VerifyContains
- VerifyExpression
- VerifyExpressionWithOperator
- VerifyIsGreater
- VerifyIsGreaterOrEqual
- VerifyIsLess
- VerifyIsLessOrEqual
- VerifyIsRegexMatch
- VerifyRange
- Workflow Events
- Workflow Foundation
Advanced Controls for Drop-downs
The tutorials on this page demonstrate using drop-down lists with the UiPath Form Designer, inside the Create Form Task activity. The most used property for achieving the results in the tutorials is the FormData(Collection).
Use them in workflows where you want to send dynamic data to populate a drop-down control inside a Form Action.
With this method, a variable of the type List of Strings holds the values of the drop-down list instead of adding static values on the Data tab in the UiPath Form Designer.
In the following example, we create a dynamic drop-down of countries, initialize a variable with the list of countries, and create an additional variable to capture the country selected by users.
To create a dynamic drop-down:
- In the Create Form Task activity, click the ellipsis (
...
) to the right of FormData. -
Add an argument for the dynamic drop-down as follows:
- Name:
countryList_dropdown
- Direction: In
- Type: List of Strings (
List<String>
) -
Value: Press Ctrl + K and enter
listOfCountries
as the variable name.ThelistOfCountries
variable contains the items in the drop-down list.Note: Array of Strings is also supported, but you must manually add the drop-down component in Form Designer and add the Field Key value.
- Name:
-
If you want to get the user selection back to the workflow, add another argument to capture the selected value:
- Name:
country
(the Field Key of the drop-down component) - Direction: In/Out or Out
- Type: String
- Value: Press Ctrl + K and enter
selectedCountry
as the variable name.
- Name:
- Click OK to close Form Data.
-
Open the Variables panel and initialize
listOfCountries
with the default valuenew List(of string) from { "India", "Romania", "US" }
.Tip: You can also choose to populatelistOfCountries
through other activities instead of initializing it.
Use them in task-based forms when you want the selection in one drop-down (parent) to populate the values in the second drop-down (child).
To create a cascaded drop-down:
- In the Create Form Task activity,
click the ellipsis (
...
) to the right of FormData. -
Bind the parent dropdown to the workflow.
For this example, create an argument that passes thelistOfCountries
List<String> variable to the workflow as a dropdown list.Note: ThelistOfCountries
variable contains the items in the parent drop-down list, meaning the list of countries.- Name the argument
CountryList_dropdown
. The Field Key property name for this argument isCountryList
. - Set the Direction as In 2.3. Set the Type as
System.Collections.Generic.List<System.String>
- Set the Value as the
listOfCountries
List<String> variable.
- Name the argument
-
Bind the child dropdown to the workflow.
For this example, create an argument that passes thestateDictionaryList
Dictionary<String, List<String>> variable to the workflow as a dropdown list.Note: ThestateDictionaryList
variable contains the items in the child drop-down list, meaning the states for each country. - Name the argument
stateDictList_dropdown
. The Field Key property name for this argument isstateDictList
. - Set the Direction as In 3.3. Set the Type as
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<System.String>
- Set the Value as the
stateDictionaryList
Dictionary<String, List<String> variable -
Bind the child dropdown to the parent dropdown.
Create an argument with the name of the child dropdown and add the_parent
suffix. Then set the Value of the argument to the name of the parent dropdown, like this:”ParentDropdownVariableName”
.For this example, create an argument namedstateDictList_parent
. The child dropdown isstateDictList
and you add the_parent
suffix to it.-
Set the Direction as In.
-
Set the Type as
String
. -
Set the Value as the
”CountryList”
.When populating thestateDictList
Dictionary variable, take note that the dictionary Key is a value from the parent drop-down list and its corresponding Value is a list of options to be shown on the form if the parent is set to the key.Tip:You can pass the values to be pre-filled (for example, with country and state fields) in the FormData collection.
If you are passing child values, make sure you also include the parent value to prevent unexpected behavior.
-
-
Map each value from the parent drop-down to a List of Strings variable. You can populate the list (dictionary) for the parent drop-down in any way, but for this example, we use an Add to Dictionary activity for each value.
- Dictionary: the dictionary of
the child drop-down,
stateDictList
. - Key: a value from the list of
strings for the parent drop-down,
CountryList
- in this example,"US"
,"India"
, and"Romania"
. - Value: Press Ctrl +
K and enter a name for the the List of Strings variable which holds the
values to show in the child drop-down when the Key value is selected in the parent -
usaStatesList
,indianStatesList
, andromanianCountyList
, respectively.
- Dictionary: the dictionary of
the child drop-down,
- Make sure you place the activity or activities for the above step before the Create Form Task activity.
- Click OK to close Form Data.
-
Open the Variables panel and initialize the new List of String variables you created with the following default values:
- for
indianStatesList
:new List(of string) from { "Odisha", "Rajasthan", "Karnataka" }
- for
usaStatesList
:new List(of string) from {"Florida", "Georgia", "Washington"}
- for
romanianCountyList
:new List(of string) from {"Cluj", "Prahova", "Constanta"}
.
- for
Download these examples here
To use cascaded drop-downs inside a Edit Grid or Data Grid component:
- Create the drop-down fields following the steps above (using the FormData wizard).
- Open the Form Designer.
-
If the drop-down fields are not created inside your form, verify that:
- The
<dropdownKey>
,<dropdownKey>_dropdown
, and<dropdownKey>_parent
arguments are correctly added in the FormData collection. -
The GenerateInputFields box is checked.
- The
- Drag and drop the Edit Grid or Data Grid component.
- Drag and drop the drop-downs created at Step 1 into the Edit Grid or Data Grid component.
- Open the configuration menu for the child drop-down (click ).
-
In the Logic tab, notice the preconfigured advanced logic.
- Navigate to the Actions > Schema Definition field.
-
Replace
[data.<parent_dropdown_key>]
with[row.<parent_dropdown_key>]
in the schema expression.
Note: The row keyword instructs the form to use the parent value from the grid row. - Save the form.
Drop-downs show at most four search results by default. You can change this limit by setting a property in the form design.
To set the number of search results for a drop-down:
- In the UiPath Form Designer, click Edit to open settings for the drop-down list and then select the Data tab.
- Under Choices.js options, add
{ "searchResultLimit" : x }
, wherex
is the maximum number of results you want to show.
If the strings in the drop-down menu have more than 50 characters, they may be omitted from displaying.
To display all options matching your search term:
- Click Edit JSON for the Drop-down List component you want to edit.
-
In the Component JSON field, add the following properties:
... "fuseOptions": { "distance": 800, }, "threshold": 1, "useExactSearch": false, ...
... "fuseOptions": { "distance": 800, }, "threshold": 1, "useExactSearch": false, ...
threshold
property dictates at what point the algorithm stops the search operation for the given search term. For example, a threshold
of 0
requires an exact match of letters and location. A threshold
of 1
can match anything, even spelling mistakes. Adjust the threshold
value based on your use case.