Variable
public class Variableextension Variable: CalculationOperandConvertibleextension Variable: ConditionNumberOperandConvertibleextension Variable: ConditionOperandConvertibleextension Variable: ConditionTextOperandConvertibleextension Variable: Equatableextension Variable: Hashableextension Variable: Encodableextension Variable: VariableDateValueConvertibleA variable is a container used to label and store content such as text, images, a webpage, or a dictionary of data.
- 
                  
                  Initializes a variable. DeclarationSwift public init(name: String? = nil, uuid: UUID = UUID())ParametersnameA custom name for the variable to display in the Shortcuts app. uuidThe internal UUID of the variable, useful for building deterministic output. 
- 
                  
                  A copy of this variable coerced into a Date with the specified date format style. DeclarationSwift public func withDateFormat(_ dateFormatStlye: DateFormatStyle) -> VariableParametersdateFormatStlyeThe date format. Return ValueA modified copy of this value. 
- 
                  
                  A copy of this variable with the value for a specified property name. DeclarationSwift public func withPropertyName(_ propertyName: PropertyName, userInfo: PropertyUserInfo? = nil) -> VariableParameterspropertyNameThe property name whose value to fetch. userInfoOptional user info that depends on the property name. Return ValueA modified copy of this value. 
- 
                  
                  A copy of this variable coerced into a Dictionary with the value for a specified key. DeclarationSwift public func withValue(for key: String?) -> VariableParameterskeyThe key whose value to fetch. If nil, returns the entire dictionary. Return ValueA modified copy of this value. 
- 
                  
                  A copy of this variable coerced into a value of the specified type. DeclarationSwift public func withType(_ type: CoercionItemClass) -> VariableParameterstypeThe new type of the value. Return ValueA modified copy of this value. 
- 
                  
                  DeclarationSwift public var calculationOperand: CalculationOperand { get }
- 
                  
                  DeclarationSwift public func hasAnyValue() -> ConditionReturn ValueA condition that evaluates to true if this variable has any value. 
- 
                  
                  DeclarationSwift public func doesNotHaveAnyValue() -> ConditionReturn ValueA condition that evaluates to true if this variable does not have any value. 
- 
                  
                  A number operand that represents this value. DeclarationSwift public var conditionNumberOperand: ConditionNumberOperand { get }
- 
                  
                  An operand that represents this value. DeclarationSwift public var conditionOperand: ConditionOperand { get }
- 
                  
                  A text operand that represents this value. DeclarationSwift public var conditionTextOperand: ConditionTextOperand { get }
- 
                  
                  Returns a Boolean value indicating whether two values are equal. DeclarationSwift public static func == (lhs: Variable, rhs: Variable) -> BoolParameterslhsA value to compare. rhsAnother value to compare. Return ValueTrue if the two values are equal, false otherwise. 
- 
                  
                  Hashes the essential components of this value by feeding them into the given hasher. DeclarationSwift public func hash(into hasher: inout Hasher)ParametershasherThe hasher to use when combining the components of this instance. 
- 
                  
                  Encodes this value into the given encoder. Throws This function throws an error if any values are invalid for the given encoder’s format.DeclarationSwift public func encode(to encoder: Encoder) throwsParametersencoderThe encoder to write data to. 
- 
                  
                  When the shortcut is run, asks for input from the user. DeclarationSwift public class var askEachTime: Variable { get }
- 
                  
                  When the shortcut is run, returns the current clipboard contents. DeclarationSwift public class var clipboard: Variable { get }
- 
                  
                  When the shortcut is run, returns the current date. DeclarationSwift public class var currentDate: Variable { get }
- 
                  
                  When the shortcut is run, returns the shortcut input from the share sheet or similar. DeclarationSwift public class var shortcutInput: Variable { get }
- 
                  
                  A variable date value that represents this value. DeclarationSwift public var variableDateValue: VariableValue<Date> { get }
 View on GitHub
View on GitHub Variable Class Reference
        Variable Class Reference