How to use a variable for the "Select Item" activity


I want to send a variable to a Select Item Activity in UiPath.

The whole scenario is like this, im taking data from a excel spreadsheet, from a specific column, im using a for each activity to iterate through the data.

I need to use this data, that im saving on a variable, to select an item from a Combo Box on VB6, the thing is you can’t type on this combo box, the first letter you type it sends the first match of the items in the comb

Hi @JavierC

1.Use Excel Application Scope Activity pass the path of excel file.
2.use read range activity create output data table variable and then use for each row activity pass the data table variable.
3.use get row item create output string variable and then use click activity in properties target pass the selector in item of for each that will select one by one.

Kommi Jeevan.

1 Like

If you cant type, how can you send the first letter? :rofl: funny aside, if you want to send just the first letter, then use in type into myStringVariable.Substring(0,1)


Well I don’t know how familiar you are with VB 6 Combo boxes, but there are ones where you can literally type, push key up and it will match your string, and there are other combo boxes where you can type 1 key, but not a whole string, making it send various matches, every time you press the key, lets say you type “bcorrea” it will first send the items matching with B, then C, and so on.

But i have worked with other combo boxes in VB 6 where you can type a whole string like “bcorrea” and press key up and it will match perfectly with bcorrea for example.

Im able to send a string from a substring, string, but that doesn’t help if there are several names that begin with that letter, thats why i talked about using the text exist every time I type that letter, and taking to much time that way.

but you should implement the same way a human would do… what is it in your application? sending every letter with a delay?

Is a combo box that contains names, i want to click on an item (name) that comes from a variable, this variable is getting data from a excel spreadsheet, with a for each im stracting those names and saving them in that variable, i want to take that variable, in that instance and use it to select that same name in the combo box.

but im confused, select item activity does not work in your case right? do you need to click the names, but the list is big and you need to filter it first?

Yeah it doesn’t work because the list is big and also, you cannot put a variable on select item, you must choose and specific item from the list that it provides, if you try to use a variable, (the one i have storing the names from the spreadsheet), it fails.

Or maybe im using select item wrong.

you sure can use a variable in Select Item activity, but maybe it wont work if it is not visible…

1 Like


I discovered what was causing the error, yes, you can use a variable in Select Item, the thing was, that i was storing a name, that wasn’t present as an item in the ComboBox, so that was causing the error, the data source contained wrong data, once i used the proper names, that also appeared on the combobox, the item got selected and the flowchart continued, thank you for your inputs

1 Like

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