Sorting Through Switch Cases Feature Request

That’s why I showed the example I showed, but I don’t think he looked at it closely enough.

Also, @private_matter I’m starting to wonder WHY you’re trying to do this. Do you really have just a Type Into in each Case, or was that just an example?

What are you trying to achieve here overall, type something different depending upon which site you’re on?

1 Like

Thank you @J0ska for giving me a good solution.

“3/ to move step just reorder values in the array, e.g. steps = { 9 ,1,2,3,4,5,6,7,8} will execute step 9 as first step”

This would indeed work as you mentioned regardless if Case 9 is at the very bottom. Though I still think that sorting like the Multiple Assign is much faster than creating a string or array, then going to the variables, and changing the position of the cases to wherever I want.

@postwick

regarding your concern, I’m actually performing RPA on Shopify menus for my stores in the Navigation. Sometimes I want to add a new page that needs to be positioned in a specific place. My sites usually contain between 10 to 30 pages. That’s why I was asking for this particular feature.

I guess the best way, for now, is to use @J0ska’s method for creating a string array. Thank you anyways for both of your help. Much appreciated.

I did what you mentioned but it’s still not working. Can you please download the demo I did and see what’s wrong? The bot is still not executing in the order I set in the variable string.

Demo.zip (6.9 KB)

Well, you did not do what I proposed. Maybe you attached a wrong file.

This is how it could look like.
Note that array index is zero-based so the “Start At” option should be 0

Indeed. In case your request will get enough votes maybe UiPath will invest the time to this change.
In my opinion it is rather a rare case.
Cheers

Yes, now it’s fully working finally. I thought I should place the string array in the default field. All that was needed was one simple expression.

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