Help Desk

Submit a ticket My Tickets
Welcome
Login

Dynamic Chain Variables

Dynamic Variables are a special kind of Chain variable that can be set and change value during the execution of a Chain. In addition, the last set value of a Dynamic Variable is stored in OneCloud and can be used in a subsequent Chain run. This is very helpful when values need to be preserved from run to run.

Add a Dynamic Variable and Set the Initial Value

In the Chain properties, select the plus icon next to Dynamic Variables to add a new variable.

Once the new variable has been created, optionally set the initial value of the variable. Valid values include alphanumeric, special characters, and spaces. Once the Dynamic Variable is no longer needed, then simply use the “x” button on the right to remove the Dynamic Variable.

If a variable is deleted

Any Command that uses a Dynamic Variable that has been deleted will see “Not Found” in a red oval.

Dynamically Set the Value During Runtime

Add a  Set Dynamic Chain Variables Chain Event to set the value of the Dynamic Variable. After inserting the event, edit it, and use select the Dynamic Variable that should be the target of the new value. Once the target Dynamic Variable is selected, set the value that can either be static text or dynamically set from a command output such as a record count or the text from a list operation.

In the example below, the exact Chain Execution date and time is being set. The value of "DynVar1" can then be used in subsequent commands that all need to use the same date and time. 

That’s it! Now the Chain will set the value of the Dynamic Variable with every run, and it can be used by other Commands and events in the Chain as well.

Placement of the Set Dynamic Chain Variables

The placement of the event is important. Similar to Commands, you will only be able to set the value of your Dynamic Variable to the output of a Command that runs before the Chain event.


What's Next?

Learn how to use Chain Schedules.

B
Brian is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.