Use of multiple conditions

hello, I will use the selectItem feature according to the data I got from excel. If the data from Excel is 1, I will select the “car” option with the select item, if the data from Excel is 2, I will select the “scooter” option with the select item and this will continue. Is there a shortcut other than making nested if conditions for these?

1 → CAR
2 → SCOOTER
3 → TRUCK
4 → AMBULANCE
5 → TRAIN
6 → BUS
7 → MOTORCYCLES
8 → BICYCLE
9 → VAN

Hi @Arzu_Kaya

did you try using the switch case activity?
you can give your excel value as input, and based on the value select the item

Regards!

Hi @Arzu_Kaya ,

For this case you can use Switch activity.
but if your option select item will be increase accordingly, you can store that ID and Value in Excel and use filter datatable to get the value.

Regards,

I don’t know how to use it I’m a bit of a beginner can you show me an example

yes i got my excel data as input. but I don’t know how to use switch case

Hi,

In this case, we can use Dictionary as the following.

dict = New Dictionary(Of String,String)From{{"1","CAR"},{"2","SCOOTER"},{"3","TRUCK"},{"4","AMBULANCE"},{"5","TRAIN"},{"6","BUS"},{"7","MOTORCYCLES"},{"8","BICYCLE"},{"9","VAN"}}

Then

dict("3") returns "TRUCK"  and dict("8") returns "BICYCLE" , for example.

Regards,

example:
image

Hi @Arzu_Kaya ,

Please check this workflow
UseDictionary.zip (10.2 KB)

It using Dictionary same with Use of multiple conditions - #6 by Yoichi

Regards,

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