Select item

Hi,

I have an excel datatable which contains 20 codes: 01 until 20. The value in the cell is stored as variable “Code”
Then, I have to enter this “code” on a webpage with a dropdownbox.
I found a way by nesting 20 if functions, but I bet there should be an easier way.
For example, if Code = 01 then select item “01. Location outside of EU”.

Thanks in advance,
Kind regards

Hi @yannip,

Switch Case is much easier compared to Nested if.

1 Like

Hi @SaranyaKishore,

Thanks for the reply.
I haven’t used it before.
Can give an example how I should use it in my case? Or do you have a sample .xaml already available by any chance?

Thanks a lot

Please refer the below link.

Thank you @SaranyaKishore,

It’s getting clearer. However, I’m still struggling a bit. the bot is not taking the correct value.
Is this how I should use it?

Thanks

Found the issue! Thanks a lot for getting me in the right direction!

1 Like