Hi Team,
I am using a dropdown in UiPath Apps and need to show only n number of values.
Example: Show only latest 6 values.
Could you please support me on this?
Thanks
Hi Team,
I am using a dropdown in UiPath Apps and need to show only n number of values.
Example: Show only latest 6 values.
Could you please support me on this?
Thanks
you can use something liek this
Listsrc.Data.Take(6).ToListSource
this will get only 6 items from list…if you want to make it variable then can add input for it and use that variable here
cheers
Hi @Anil_G ,
Thank u and could u please share an example or screenshot of this how to use please?
If you want to use for a specific number always then just copy paste the above formula in listsourcefield of dropdown…ensure you use your listsource variable my variable is listsrc…you need to change
If you need to fetch how many to display from user then
Create a app variable of listsource type…
And link that variable to dropdown listsource
Now create a event rule on input firld where you would ask the user to input the value…now use a set value in create field and set the list source variable usign listsec.Data.Take(valuefromlabel).ToListSource
Hope this is clear
Cheers
Thanks a lot and I need add the sort according to the descending order as well to the same query. How do I achieve that?
Thanks
try like this
Listsrc.data.OrderByDescending(Function(x) x.DisplayName).Take(6).ToListSource
cheers
If you want to take first 6 rows and then sort those in descending order then try this query.
dtDropdownSource.ToListSource().data.Take(6).OrderByDescending(Function(row) row.Item(0)).ToListSource()
Thanks,
Ashok ![]()
Remove Item and check what are the available columns there. Select the suitable one.
Thanks,
Ashok ![]()
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.