Mass move variable scope

Hi Everyone!

I am wondering if there is an easy way to move all variable scopes to their lowest level that they are currently used.

I have a bad habit of putting most of them in the main scope because I’m not always sure if I will need them elsewhere. I know I need to break this habit, and will. But I’m wondering if there’s any built it way to do this to all variables.

If not, it would be a super handy feature!!

1 Like

Actually keeping the variable with whole sequence as SCOPE is a good practise as that would ensure that variable becomes GLOBAL and it wont lead to any error because of the accessibility
so to make all the variables to a common scope, we need to get only to VARIABLE Panel
and i hope thats the only way on doing so

Hope this would help you
Cheers @RoboDan

1 Like

And
For more info on this

Cheers @RoboDan

1 Like

I thought it was best practice to keep variables to the smallest scope needed? At least that’s how it is with most programming disciplines.

1 Like

Well thats correct
but certains variables are to be used in Global scale, like the one we get from read range…
if its there in excel application scope alone we wont be able to access them outside that scope…right
like wise few variables and usage on scope depends on the process we take on
–so in common its good to keep them in common, so we wont face any problem on accessing them especially when we are passing those variables as input arguments or storing the value of output arguments from a invoked workflow

–you are right using certain variables within its class scope (here container scope) is a good practice…buts its again based on the process…and mostly when we create variable from being inside the property panel of the activity it will create the variable with the activity current being container as scope…so we can accomplish in that way rather defining in the variable panel first and then using them in the activities

Cheers @RoboDan

1 Like

Thank you for your reply! :slight_smile:

1 Like

Great
so any further queries to be discussed
Cheers @RoboDan

1 Like

Nope that’s it! Thanks!

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