Passing arguments from main to sub-sequences

Hello All, a very simple question that is bugging me and I can’t figure it out.

I have a flowchart “main” that consists of 2 sequences: sequence1 and sequence2. In sequence1, the variable “strOut” is created as an Out argument. In “main”, this variable is imported to a global scope variable “strOutWF”. I can display it with message box so the value is gotten correctly.

However, I would like to use this “strOut” variable (created in sequence1) in the other sequence of “main”, in “sequence2”. Sequence2 consists of just the message box activity and a locally declared “strOutWF” variable. When run, the empty “strOutWF” is displayed. Why? How can make “sequence2” have the value of the “strOut” argument?

I suppose this is super easy but I just don’t know how. Thanks a lot!

image

Hello,

You should create few variables in Test3 scope, then create out and in arguments in the workflows that you are invoking. This is called mapping.

For example lets say that your “Assign variable 1” workflow returns Username.
You would need to create Variable username in test3 flowchart, and out_Username Argument in Assign Variable 1 workflow.

Then when you click on Assign variable 1 you can map the values with “Import Arguments”

Check this article:

you were almost done
in the second sequence create a argument named in_str with direction IN and pass the global variable strOutWF as input
–now inside the second sequence, in the message box mention the in_str as input
it will display the value for sure

hope this would help you
Cheers @Uhrinowitz

Thanks a lot (for the both of you)! This one actually solved the issue. I was indeed missing the In argument (in_str). So I just needed to create the empty in_str argument in sequence2 and in “main” edit its arguments so that the value of in_str is the “strOutWF” global variable. Thanks!

2 Likes

Fantastic
Cheers @Uhrinowitz

1 Like

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