Please see the flow below. I have 10 URL’s that I want to open based on a value in a datatable.
In the below example I simplified it and the value would be “GAR”. I would then like to open the URL defined in the variable pathGAR. But as it is now, it will only open the browser and type “pathgar” in the address bar.
That is how I am doing it right now. But I have to multiply the same code in the switch 10 times then. The code is very extensive and my Uipath is workflow is getting very slow…
I know, that is where I am struggling a bit at.
Imagine I get “GAR” as a variable value, how should I use the assign then to concatenate it with the (predefined) word “path”? I tried “path”+sector.tostring or “path”+‘sector.tostring’, but none is giving me the result.
I’m sorry but I did not get the 'invoke workflow part" :).
You are essentially wanting to say “If “GAR” then use pathGAR” right? I think you will want to use a Switch, then create a different variable to represent the path. This is what @TimK is recommending.
The other option would be to have all the paths in an array, then just loop through them if the intent was to process each path. But let us know if you want to take that approach instead.
So in the switch, it would see the sector, then assign the url to the same variable in each Case. Therefore, when it gets to the Open Browser it can use that variable as the url.