How to build a dropdown in UiPath apps

Hey @shetanshudhar,

  1. Create a process with an out argument in main workflow of type string array. Add it in your app.

  1. Go to your dropdown element and map the process out argument to the list source.

  1. Go to the page event - in which the dropdown is present

  1. Edit Rule & Use Start process action to initiate your process.

That’s it you are good to go.

Once you run the app, you can see your dropdown with populated values

Adding to it, You can have any number of arguments and map it to various dropdowns accordingly.

Thanks :slight_smile:

2 Likes

@Nithinkrishna so do we need to run background processes having string array out arguments via bots every time we want to populate values in a dropdown in UiPath apps?

1 Like

Yep Right, for now that is the case.

I’m not sure if there is any progress as far as adding an easier way to populate drop-downs in Apps.

UiPath could implement this (in theory) as follows:

Link Assets to Apps. We create a text type asset and populate a csv list of key-value pairs as a string into this asset. Something like this

[(1, “Excellent”), (2, “Good”), …]

The drop down control in Apps could be enhanced to accept this asset as an input and the key-value pairs could be mapped into the drop down provided the above string is formed correctly.

The advantage here is, this arrangement could be used by humans for static assets and also Robots for Dynamic assets, but there may be additional challenges if any apps are currently using that drop down control at the time!

Just a thought. :thinking:

2 Likes

Excellent suggestion @AndyMenon! Creating static drop-downs and lists is in the works and will be in the next update for the Expressions Preview.

We also have asset integration on our backlog and will definitely look into prioritizing it.

1 Like

Fantastic @evan.cohen ! :slight_smile:

Looking forward to these enhancements :+1:

Thanks!

I see that they introduces static dropdowns:
Enable this setting in General tab of the App
image

And start using functions:

imageimage

2 Likes

Hi @Oana_Georgiana_Vasile

this is my case:

Can you help me, why is it showing:

image

Thx and kind regards,
Vanja

Put the list under List Source. You put it under Tooltip.
image

1 Like

Thank you @Oana_Georgiana_Vasile , I did not have that option available.

Hi, @Oana_Georgiana_Vasile

Do you have any suggestion how to solve it with “Other…”?

Thx and kind regards,
Vanja

I am not sure if I understood correctly that you need to see in the dropdown the value entered by the user in Other field, but here it is a solution:

  1. Go to Other… text field and create a variable where to store its value. You can also use the same variable used to store drop-down value


    image

  2. drag and drop it in the Value Binding
    image

  3. Go to drop down on List Source and drag and drop the Value of your Text Field. My text field is named DemoText.

Hi @Oana_Georgiana_Vasile

Thank you very much :slight_smile:

I solved it that way, and it is working:

image

image

image

User selects Other in dropdown and enters it into text field “Other…”.
When moving mouse to another field, UiPath App displays content of “Other…”
in dropdown field:

image

Kind Regards,
Vanja

Hi guys, I have an entity named Processes. And now I wanna add a dropdown control with the list of process names from that entity. How can I do that?
=List(Processes.Process Name) doesn’t work

1 Like

Hey @tranthao240495

Here is the way of doing it, Hope this helps.

  1. Pass only **Data Entity** table name in **List Source** field
  2. Pass the **Column** name you want to populate in the dropdown in **Column** field

Thanks
#nK

1 Like

Thank you @Nithinkrishna , it works <3

1 Like

Hello Guys,

How can I pass the Default value as List item 1.

In my case I created List variable and passing the values. I want to display in drop down default value as first item from the List.

How can I achieve this?

Thanks,

@evan.cohen Any idea why some projects show the ‘resources’ panel and allow simple creation of static lists and other projects do not show the ‘resources’ panel when “=” is entered? My older UiPath apps allow very easy creation of dropdown lists but my new project simply opens an expression editor.
Old Project:

New Project:

@chad_boss1:
For us the resource panel is not poping up too. don’t know whats wrong there, but the expression editor is not that handy to use. even the documentation is always showing the resource panel … didn’t find any documentation regarding the expression editor so far.

with new editor i did it like that:
we managed to fill a dropdown via data service. So i created a new entity in data service and added my dropdown values as data. in the UiPath app studio add on the entity. On the dropdown source field i click on the settings button behind it and choose query builder. Then selecting my added entity. In the columns field i write the technical field name of the entity in data service i want in the dropdown. (technical field is not the “display field”). Hope that helps.

edit: i just found that the “resource” panel is the “legacy editor” Apps - Legacy versus VB expressions (uipath.com)

1 Like

Thanks for the reply! Yes, I just discovered the same myself and was going to edit this post. When creating a new app, you can select either ‘VB’ or ‘Legacy’. That choice cannot be changed once the app is created.

Regarding the specific question I asked about how to make a simple static list for a dropdown, the page you linked to shows the old syntax vs the new syntax, so I’ve included that here:

“Legacy Apps”
=[“Value1”, “Value2”, “Value3”]

“VB Apps”
AppsDataSource.from({“Value1”, “Value2”, “Value3”})