shiva_raj2
(shiva raj)
December 16, 2022, 6:12am
1
Hi,
I have a drop-down list of roles in a web application. If user has one role then we need to press control key and add another role in it.
Can someone please help on how to do this in select item activity like how to pass control key in select item activity.
thanks in advance
Anil_G
(Anil Gorthi)
December 16, 2022, 6:14am
2
@shiva_raj2
Please use this activity
UiPath.Core.Activities.SelectMultipleItems Selects multiple items from a combo box or list box. After you indicate the UI element on screen, add the labels you want to select in the MultipleItems property. At runtime, the specified items are...
This helps you select multiple items
And there is no option in select item to send keys
Cheers
shiva_raj2
(shiva raj)
December 16, 2022, 6:15am
3
I used that then it was throwing an error
I need to take the roles from excel sheet and select
Anil_G
(Anil Gorthi)
December 16, 2022, 6:17am
4
Hi @shiva_raj2
It needs an array of string… values should be passed like an array like below
{var1,var2….}
{roles.tostring.trim}
I hope roles is of type string
In excel are the roles in a column?
Cheers
1 Like
shiva_raj2
(shiva raj)
December 16, 2022, 6:19am
5
yeah, Roles is string type, Roles are present in excel column
Anil_G
(Anil Gorthi)
December 16, 2022, 6:20am
6
@shiva_raj2
If all roles are in a column in excel then read the excel into datatable(dt)
Then
dt.AsEnumerable.Select(function(x) x("RolesColumnName").Tostring).ToArray()
This will give the array of all the roles which can be passed in the select multiple items
Cheers
system
(system)
Closed
December 19, 2022, 6:29am
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.