Reputation: 3920
Variables in UiPath are visible only within the activity block in which they are declared, and they are definitely not visible in other workflows or sequences.
If I have a variable and I want to use that variable's value in another sequence or workflow, how do I access it?
Upvotes: 1
Views: 4369
Reputation: 3920
Indeed, variable scope in UiPath is limited to the activity in which a variable is defined, and of course, the sub-activities nested within.
To pass a variable from one sequence to the next, you must use UiPath arguments.
If you want to pass a variable from Sequence A to Sequence B, you configure an argument of the same data type in Sequence B using the Arguments tab, which is right next to the variables tab.
There are three possible argument directions you can configure:
in
direction.out
direction.With the argument is defined, the point where Sequence A invokes Sequence B will have an indicator that you must Import Uipath Arguments
. Click on this button and map the argument defined in Sequence B to the variable used in Sequence A.
When you are finished, you will have successfully passed a UiPath argument from one sequence to another.
Upvotes: 2