Hi Guys,
I have a string stored in a variable which changes randomly on loop. The string that comes in the keyword is the names of the Airport, so i need to convert that names into its corresponding Airport name codes. I also have a mapping sheet with me.
So like. if “Bangalore” is the airport name stored in the variable then i should change the value in the variable as “BLR”
Post ur suggestion oh how i can achieve this. if i am using if activity it would be a mess, because there would be around more than 20 airport names list will be there.
Hi @jishnupnair1996,
Assuming that the mapping has cities and airport codes in them, write a select query on the based on the string in loop and then assign the corresponding value to it.
Can you share both the sheets with cities names and airport names.
Regards,
Shiva Karthik
Sorry @Shiva_Karthik these files contains highly confidential data.
Please assume the some names and check with that.
Hi @Jishnupair,
I have assumed that a string array with different city names in it and created a mapping sheet which looks like the image below. Developed the code which would read the mapping file and map the cities with airport and give you a dictionary with cities as keys and corresponding airport codes as values.
I am attaching the mapping file and output screenshots along with the sample code here.
Main.xaml (11.7 KB)
1 Like