In any language i’ve programmed a Case statement is a shortcut for when an If statement has many different possible output values. I programmed a Case in UIPath like below, and it is not working which i believe cause it thinks “VSecurityAnswer” is constant text, but it’s really a variable. Some answers in the forum here said you can only have 2 case responses which defeats the purpose, and some had people put an If statement of code (not activity) in the Expression line, which defeats the purpose. I’m about to just do 3 If statement activities, but i just want to confirm that Case statements are useless for this in UIPath? Or is there a way to tell UIPath that the string in the Expression box is an actual variable and not text. I’m really surprised you can;t just type a variable, and for constant text you would just have it in double quotes.
[EDIT] - I found the below video made by UIPath devs and they are using the Switch exactly as i would like to. The only difference is that i am doing string compares, and the Cases are variables. So this should be possible. https://www.youtube.com/watch?v=viZMJ0NoGo0
[EDIT 2] - This below was what i was trying to avoid but i did 3 nested IFs. Pretty ugly but it works . If someone knows how to accomplish a string comparison in a cleaner Switch, I’d still like to see it.