×

Global Variables

iOS 14 +

Notes

Set, get and delete global variables that persist between your shortcuts and sync between your devices.

Syntax

globalVariables(mode: <#Enumeration (GlobalVariableMode)#>, getVariableListFilter: <#Enumeration (VariableFilters)#>, deleteVariableListFilter: <#Enumeration (VariableFilters)#>, addVariableFilterList: <#Enumeration (VariableFilters)#>, setVariableKey: <#String (Allows Variables)#>, setVariableValue: <#String (Allows Variables)#>, getVariableKey: <#String (Allows Variables)#>, deleteVariableKey: <#String (Allows Variables)#>, getAllMode: <#Enumeration (GetAllVariablesMode)#>, joinMode: <#Enumeration (JoinMode)#>, newLine: <#Boolean#>, addKey: <#String (Allows Variables)#>, addValue: <#String (Allows Variables)#>, includeCreationDate: <#Boolean#>, addDictValue: <#String (Allows Variables)#>, addDictKey: <#String (Allows Variables)#>, getDictVarKey: <#String (Allows Variables)#>, getDictValue: <#String (Allows Variables)#>, addDictValueKey: <#String (Allows Variables)#>)

Example

globalVariables(mode: Set, getVariableListFilter: All, deleteVariableListFilter: All, addVariableFilterList: All, setVariableKey: "Username", setVariableValue: "ShortcutInput", getVariableKey: "", deleteVariableKey: "", getAllMode: , joinMode: , newLine: , addKey: "", addValue: "", includeCreationDate: , addDictValue: "", addDictKey: "", getDictVarKey: "", getDictValue: "", addDictValueKey: "")