Uipath Apps - dropdown Default Selected Value

Hello,

Does somebody knows how the “Default Selected Value” feature functions in UiApps?

I have a dynamic dropdown and want to output in a variable all the values from the dropdown without manually picking them. I believed that “Default Selected Value” would help with this, but it isn’t displaying any values.

image

@DELautomation ,

Please have a look at below video.

Thanks,
Arvind

@DELautomation ,

Please see below as well, i have talked about dropdown setup.

1 Like

Hi @DELautomation

Check out this blog

Hello,

I have watched your video, but I do not need the first value only. I need to output as selected values all the items from the dropdown as default values and then to deselect them if needed. I use a multiselect dropdown.

@DELautomation ,

Please look for multiselect.

Thanks but I know how to populate a dropdown. My question was related to default selected value property.


For example here, I populated the default value, but on runtime nothing is showing up.

@DELautomation ,

is default value coming from process? Please watch complete video, there i have talked about default value set as well.

@DELautomation ,

you need to do something as below.

Dropdown
{PageName}.{ControlName}.Datasource.data.where(Function(item) item.{FieldName}.Value={Variable}.{Field}.id.Value).FirstorDefault()
E.g ViewRequest.Dropdown.DataSource.data.Where(Function(item) item.Id.Value=AppVariable_LeaveRequest.LeaveType.Id.Value).FirstOrDefault()

Multiselect
{PageName}.{ControlName}.Datasource.data.where(Function(x) {variable}.{Field}.Contains(x.)).ToList()
E.g - ViewDetails.Multiselectdropdown.DataSource.data.where(Function(x) AppVariable_LeaveRequest.ColorSet.Contains(x.NumberId)).ToList()

Thanks,
Arvind

Thank you,

With what do you replace {variable}.{Field} considering that I do not have a grid selected like in your example. My source is a data table from data service and I need to extract data from one column… tableFromDataService.Column doesn’t work…

@DELautomation

Let’s have a call . I am really confuse with your query nown

Hi, unfortunately I can not share the data but I’ll do my best to explain the use case.

My scenario implies populating a multiselect dropdown with data from a data service, but I want all the dropdown options to be selected by default. I tried in legacy then in VB mode but I do not manage to get the default output that you have shown in the video.

DataService fields: user, account, id
In the multiselect dropdown I need all the accounts selected by default, so the user can just just deselect something if needed.