Creating Arguments

Can someone explain or help me understand if i am doing somehting wrong. it appears that we have continue to create new arguments for the same data each time i invoke a new

Here is my workflow

The workflow has following arugments

How the second ones had to be redefined.

However, I want to reference these arguments in some of the other sequences so i don’t have to keep declaring them over and over again… For example even though the Arg_Sym_Number_Out in in the above workflow, it does not appear in another sequence. I have to add it

So what I am asking is how can I declare an argument or variable, and have it available for the entire workflow, versus having to redclare an argument for every sequence?

I hope this makes sense.

Are you using Invoke Workflow? If so each xaml will have its own arguments, and you have to pass them to Invoke Workflow. Also, don’t overuse Invoke Workflow. The only time you should be using it is if the same code is repeated throughout your automation.

If all of this is just in one xaml but separated into Sequences, all arguments are available globally to all sequences.

For regular variables, you need to learn how scoping works.

If you are using nested sequence you need to give increase scope of inner nested variable to main sequence so it will be available globally in all sequence.

If you are invoking workflow you need to pass argument everytime

You can also try https://marketplace.uipath.com/listings/velocistar-globalvariables-activites

Then set the globals once, use them anywhere.

When you create a variable please check the Scope of it so you can use the same in your entire file(xaml). But if you want to use that variable value in another file then you have pass it via argument only please check the scope for the argument. you can verify the below link to understand argument.

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