Input DropDown


#1

Hi everyone,

I’m trying to complete an input box (dropdown list) for a form on Internet, this dropdown has options like this:

United States of America - USA
Afghanistan - AFG
Canada - CAN

But my excel file has the information in this way:

USA
AFG
CAN

So, is there any way when my variable = USA the bot understand that it must chose: United States of America - USA?

Thanks in Advance, Marco


#2

Hi.

Sure. What you will need to do is store all the items from the drop down to a list or array variable, then match up the item that contains your string. Then, use the matched item in your Select Item activity to actually choose it.

See if you can find some info on doing this here:

To be simple you will do this:

  1. Assign items to array variable
  2. Select Item activity with:
        variable.Where(Function(x) x.ToString.Contains("USA"))(0)

Regards.


#3

Awesome! Thank you so much…