This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
action:Set_Variable_to_Text [2017/09/07 00:15] peternlewis |
action:Set_Variable_to_Text [2023/09/15 05:44] peternlewis |
||
---|---|---|---|
Line 2: | Line 2: | ||
The Set Variable to Text action allows you to set a selected variable to plain text, by either typing in the text box, or selecting a [[:Tokens|Token]]. | The Set Variable to Text action allows you to set a selected variable to plain text, by either typing in the text box, or selecting a [[:Tokens|Token]]. | ||
+ | |||
+ | Alternatively (v9.0+), you can Prepend the text to the variable, or Append the text to the variable by selecting from the action (gear) ⚙ menu. | ||
{{:action:set-variable-text-token-popup.png?nolink|}} | {{:action:set-variable-text-token-popup.png?nolink|}} | ||
+ | |||
+ | You can (v11.0+) set a specific array entry within the action. You can delete the entry by setting it to `%Delete%`. | ||
===== Examples ===== | ===== Examples ===== | ||
Line 26: | Line 30: | ||
{{:action:set-variable-text-combine-var.png?nolink|}} | {{:action:set-variable-text-combine-var.png?nolink|}} | ||
+ | |||
+ | ==== Append to Variable ==== | ||
+ | |||
+ | You can append directly to a variable with the //Append// variant of the action: | ||
+ | |||
+ | {{append-variable-with-text.png?nolink&512x157| Append to Variable }} | ||
+ | |||
+ | or equivalently using text tokens to expand the variable: | ||
+ | |||
+ | {{set-append-variable-with-text.png?nolink&512x157| Set Append to Variable }} | ||
+ | |||
+ | ==== Set Second Line of Variable ==== | ||
+ | |||
+ | You can specify an array entry of the variable to set. By default, entries are comma separated, but you can specify an specific separator after the closing square bracket (`]`), | ||
+ | |||
+ | {{ set-second-line-of-variable-example.png?nolink&512x310 | Set Second Line of Variable Example }} | ||
===== Setup ===== | ===== Setup ===== | ||
Line 93: | Line 113: | ||
===== See Also ===== | ===== See Also ===== | ||
- | === Actions === | + | ==== Actions ==== |
+ | * Prepend Text to Variable | ||
+ | * Set Variable to Text | ||
+ | * Append Variable with Text | ||
* [[action:Set Variable to Calculation|Set Variable to Calculation]] | * [[action:Set Variable to Calculation|Set Variable to Calculation]] | ||
* [[action:Set Variable to Keychain Password|Set Variable to Keychain Password]] | * [[action:Set Variable to Keychain Password|Set Variable to Keychain Password]] |