Update Variable
Octory PRO
Element type: Dictionary
Availability: 2.1.0+
Update a variable in the session. If the variable does not already exist, it will be created.
warning
Updating placeholders is not allowed and will be prevented.
Keys
Name | Type | Possible values | Required |
---|---|---|---|
Type | String | UpdateVariable | Required |
Variable | String | - | Required |
NewValue | String | - | Required |
Condition | Dictionary (Condition) | - |
Detail
Type Required
Type: String
Explanation: The type of the action has to be UpdateVariable
.
Variable Required
Type: String
Explanation: The name of the variable to create or update.
NewValue Required
Type: String
Explanation: The value the variable should be updated with.
Condition
Type: Dictionary (Condition)
Explanation: Allows launch the action only based on a boolean expression.
Example
Update the variable "userGroup" with the value "Sales".
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<key>ActionSets</key>
<array>
<dict>
<key>Type</key>
<string>Parallel</string>
<key>Triggers</key>
<array>
<string>Custom(changeGroup)</string>
</array>
<key>Actions</key>
<array>
<dict>
<key>Type</key>
<string>UpdateVariable</string>
<key>Variable</key>
<string>userGroup</string>
<key>NewValue</key>
<string>Sales</string>
</dict>
</array>
</dict>
</array>
<!-- ... -->
</dict>
</plist>