How to populate dynamic values to the Select Boxes based on the other Dropdown list component

Hi Team,

I am unable to populate dynamic values to the Select Boxes component with Set Form Values in the run time based on the other Dropdown list component.

We are using the Form Dependency: UiPath.Form.Activities 25.10.0

Can anyone please help me on this?

Here’s how you can correctly handle dynamic select box population in UiPath Forms using UiPath.Form.Activities v25.10.0, especially when you want one dropdown (say City) to depend on another dropdown (say State).


:wrench: Scenario Example

You have two dropdowns:

  • Dropdown 1: State
  • Dropdown 2: City

When the user selects a State, the City dropdown should show only cities from that state.


:puzzle_piece: Key Concepts

In UiPath.Forms, this kind of behavior is achieved using:

  • Form Data Binding
  • Dynamic Data Sources
  • Set Form Values activity at runtime

However, many users face issues in recent versions (25.10.0+) because of how Set Form Values works — it cannot directly rebind the data source of a Select Box during runtime unless the form JSON is correctly structured.


:white_check_mark: Recommended Solution Steps

:one: Configure your Form JSON correctly

Make sure the City dropdown is configured to accept a variable list as its data source.
In the Form Designer:

  • Select your City dropdown.
  • In Options Source, select Variable.
  • Give it a variable name, e.g. cityList.

That means your dropdown options come from a variable cityList that you will set dynamically.


:two: Define the form data in UiPath

In the Create Form or Show Form activity, add these form data bindings:

{
  "state": "",
  "city": "",
  "cityList": []
}

:three: Use “Set Form Values” activity

Now, when the user selects a state, trigger a Set Form Values activity to update the cityList variable dynamically.

For example:

If selectedState = "Maharashtra" Then
    cityList = New List(Of JObject) From {
        New JObject(New JProperty("label", "Mumbai"), New JProperty("value", "Mumbai")),
        New JObject(New JProperty("label", "Pune"), New JProperty("value", "Pune"))
    }
ElseIf selectedState = "Punjab" Then
    cityList = New List(Of JObject) From {
        New JObject(New JProperty("label", "Amritsar"), New JProperty("value", "Amritsar")),
        New JObject(New JProperty("label", "Ludhiana"), New JProperty("value", "Ludhiana"))
    }
End If

Then use Set Form Values like:

{
  "cityList": cityList,
  "city": ""
}

:white_check_mark: This will dynamically update your Select Box options during runtime.


:four: Important Notes (specific to v25.10.0)

  • Ensure that your variable names in the Form Designer exactly match the keys you pass in Set Form Values.
  • Avoid binding the Select Box to both a static list and a variable source at once — only variable.
  • Use onChange events in the first dropdown (state) to trigger a workflow rule or an external call to update the second.

:brain: Extra Tip

If you’re embedding logic directly in the form (via Rules → Actions):

  • Add a rule to your State dropdown:

    • When: State changes
    • Then: Call Set Form Values
    • Value: A dynamic variable that holds the appropriate list

:rocket: Example Summary

Step Component Action
1 Form Designer Set City Select Box data source = cityList
2 Form Data Initialize cityList = []
3 On State Change Trigger Set Form Values
4 Set Form Values Pass { "cityList": updatedCityList }