How to change the list source of a dropdown box at runtime

Hi,

Is there a way to change the List source in a dropdown box at runtime, such that (see image) if I select a particular value in the ‘Select Company’ dropdown box, the items in the ‘Select Product’ dropdown box would change.

I tried assigning an argument to the List source so that the process that runs when a specific Company is selected will return a list of corresponding items to the Products box, but it simply does not change at runtime. Help.

Hi @kwv

Did u mean that u need to get the specific item in select product corresponding to that company ?
is it right?

No, what I mean is that when I choose a specific Company, a different list of products will be displayed in the Products dropdown box.

Like for instance, if I select the company “Apple” , the products dropdown will show
-iPhone 12 Pro
-iPhone 12 Pro Max
-AirPods Pro

and if I select the company “Samsung”, products will show
-Galaxy S21
-Note 10
-Note 20 Ultra

I believe we where able to resolve this on a call. It would be great if you could share the solution for the rest of the community!

Hi @evan.cohen

@kwv I think the process can be done by simple excel Automation

Like creating Column for company and column for product

So based on company input from drop-down that input will go to Uipath process to filter the company product based on excel details and populate to a list which is connected to the product drop-down

This is the logic @kwv can try

Sorry for delayed response

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

Hello Evan,

Yes this was resolved thanks to Anthony Seagar, Presales Technical Consultant at UiPath. Below is a verbatim copy detailing his solution:

Have a process run when the app loads that returns a string array output for the first dropdown. Use the output as List Source for the first dropdown.




Configure an event on the first dropdown for a value change that runs a second process to get the list of phones in a string array output for the second dropdown. The second process has a string argument input that is configured as the “Selected Value Binding” directly on the first dropdown (“In_Phone” on the above screenshot). Note: It would not work for me if I used a variable in the Selected Value Binding and tried to pass the variable to the second process as the input.




On the second dropdown configure the output from the second process as the list source.




Run the app!

1 Like

By the way, @evan.cohen , you might as well look into a possible bug. As in the example above, (see second image) when we invoke a process upon value changed event of a dropdown box and we want the selected value as parameter, the process will not work if we set the “Selected Value Binding” of the dropdown to an app variable and pass it as an argument to the invoked process. Instead, it only works if the in argument is configured as the “Selected Value Binding” of the dropddown box.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.