Tenjin Icon

Flow Variables Actions

Assign Variables

If you want to assign a variable to a constant, simply type the constant in the text box. If you want to do a calculation, type an equal sign (=) then the formula you want to use. Use the (x) button above the entry box to insert a variable. Function names are case-sensitive, so toUpper will work, but ToUpper will not. View the function reference on the Microsoft website for more information.

Detailed inline help is available.

Assign Variables with JSONPath

You can select values from a JSON object using JSONPath. Examples can be found within the inline help.

Declare Variables

User and conversation-scoped variables are global, meaning they exist beyond the scope of the flow where they were assigned. If you want to use a global variable from another flow, use the Declare Variable action. This action informs the current flow that the variable will exist during the conversation and will allow it to be used in the current flow.

For example:

  1. The conversation flow assigns a user scoped object variable: mySettings.
  2. You are now working in a project flow and want to use the mySettings variable.
  3. In the project flow declare the variable, make the name mySettings, type "Object", and persistence "User".
  4. After the variable declaration you will be able to use the variable within the project flow.

Important Notes

  • Variable declaration does not create variables. If a declared variable has not been assigned in an earlier flow, it will have a value of null and your flow is unlikely to work as expected under these circumstances.
  • It is good programming practice to minimise the use of global variables since they make reasoning about the program difficult, but sometimes it is necessary, hence the Declare Variables flow action.

Share this article

Comments

0 comments

Article is closed for comments.