I am working on a project where I want to take an array of strings and use a switch statement to execute certain actions depending on each of the values. I’ve done something similar in C++ for other projects outside of UiPath, but it’s giving me a hard time here and I’m not sure at this point what I am doing wrong.
I have tried using “for each” and “while” (with counter) loops.
Each time, the problem is that the switch statement executes only once, for the first item in my array. I am pretty sure the problem is not with my loop since I can print the values of each array element using either the for each or while loop.
Any suggestions for how to fix this so that the switch statement executes for each iteration of my loop?
Screenshot below of the code that is giving me issues. This one uses the for each loop, but like I’ve said, I also have tried while loops with counters.