Using for each against an array in StudioX

Hi Team,

I am using get sheets function to obtain the list of all sheets in gsheet. Once that is done I would like to run each item in the array obtained from gsheet in a switch function, basically if currentitem is equal to specific value I would like run a specific function under a case within switch.

However I am unable to determine how can run a loop for each item against array I will obtain post using get sheets. Any help would be appreciated. Thanks!!

1 Like

@Raghav_Dhawan

In the properties of switch activity change the type of argument to string

For more about switch activity refer the below link

Mention something like this in switch case item.ToString
or
click on plus symbol and use saved variables

and in each case mention the value u want to switch without double quotes (just value)

Hope this helps

Cheers @Raghav_Dhawan

Hi,

Which version of StudioX and UiPath.System.Activities package do you use?
It seems there is something wrong with currentitem from your screenshot.
In my environment, it will be as the following.

For now, can you try to upgrade or downgrade UiPath.System.Activities package?
(or upgrade StudioX itself to the latest)

Regards,