How to use a variable in a different file in the same project

Hello, if I have the string variable x and I am currently in file1 and I would like to use the variable x in another file called file2 in the same project how would I do that. I saw something about using the invoke workflow file but was not sure how to set up the correct syntax.

Thank you in advance for your help!

I think this will be useful to you.You need to invoke file 1 in file2 using invoke workflow activity.

Hi @Sahil_J_Patel

Use invoke workflow activity in file1 and select file2 , in file2 arguments section create a in argument of string type, the. In file1 invoke workflow activity click import arguments it will show the variable created in file2 in value pass the variable x, then in file2 you can use the variable created in the argument.

Hi, @Sahil_J_Patel

Do see the attached project.

In workflow 1, variable X was created. Some actions was done to it. Then, we have an out argument, out_X which takes the value of the variable X.

In Main, we invoke Workflow1.xlsx → and create a variable in Main, mainX, which takes the value of the argument.

I do suggest you though to go through the following courses in Academy

  • Variables, Data types and Control Flow
  • Project organization

Also, do check the docs: (34.7 KB)

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