How to pass arguments in uipath

passing arguments in UiPath

How to pass arguments in uipath

UiPath Arguments are used to pass data from a workflow to another. we can say its a kind of global type variables. In a global sense, they resemble variables, as they store data dynamically and pass it on. Variables pass it to other activities,while arguments pass it to other workflows. As a result, they enable you to reuse workflows  time and again.

UiPath Studio supports a large number of types of arguments, which coincide with the types of variables. Therefore, you can create generic value, string, Boolean, object, array, data table  arguments and you can also browse for .Net types, just as you do for variables. Additionally, arguments have specific directions (In, Out, In/Out, Property) that tell the  application where the information stored in them is supposed to go.

Example of passing arguments in UiPath

For using arguments ,we are creating two separate sequences. in first sequences we are creating a arguments and assigning a value inside it. In second sequences we are getting first sequences (arguments) value and display in message box.

Step 1 : 

  • Create a new sequence name as ex . arguments.
  • In the Arguments panel, create an argument, strArgument
  • From the Direction list, select Out, and do not change the Argument Type from String.
  • Add an Assign activity to the Main panel.
  • In the Properties panel, in the To field, add the strArgument argument and put some value(Ex. “passing arguments in uipath”) inside this string

Follow the below screen for doing above activity.

How to pass arguments in uipath

Step 2: 

  • Create a new sequence name as ex . GetValuefromArguments.
  • Create a string variable, strShowArgumentsValue.
  • Add an Invoke Workflow File activity to the Main panel.
  • On the activity, click the Ellipses (…) button and browse for the previously created sequence and select it .
  • Click Import Arguments. The Invoked Workflow’s Arguments window is displayed. Note that
    the argument of the first sequence is displayed here.
  • In the Value field, add the strShowArgumentsValue variable and click Ok. The argument is imported and the value from it is going to be stored in the current workflow through the strShowArgumentsValue variable.
  • Add a Message Box activity under the Invoke Workflow File.
  • In the Properties panel, in the Text field, type strShowArgumentsValue + ” Correct get the argument value here”, for example

    Follow the below screen for doing above activity.

How to pass arguments in uipath
How to pass arguments in uipath

When you execute it, below is the result we will get.

passing arguments in UiPath

For reference :  Uipath Tutorials

for Reference Visit my other Post :  uipath keyboard shortcuts

managing variables in uipath

 

SHARE THIS

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.