Imply

Verb: imply

Available from: <Enterprise>

Modifies the value of a variable if the command's condition, that represents a business rule, is met.

Syntax

imply [--name(String)] [--executeonce(Boolean)] [--priority(Numeric)] --variablename(String) [--value(String)] --left(Variant) --operator(ConditionalOperators) --right(Variant) [--negate(Boolean)] (Rule)=output

Inputs

Script Designer Required AcceptedTypes Description
--name Name Optional Text Name of the rule in the context of a rule set.
--executeonce Execute Once Optional Boolean When enabled, executes the rule only once.
--priority Priority Optional Number Rule execution priority in a rule set context.
--variablename Variable Required Text Variable to have its value modified if the condition is met.
--value Value Optional Text Value that should be assigned to the variable.
--left Left Operand Required Any Value used to evaluate the condition.
--operator Operator Required ConditionalOperators Rule used to evaluate the condition. Options:
  • Begins with
  • Contains
  • Ends with
  • Equal to
  • Greater than
  • Greater than or equal to
  • Is empty
  • Is null
  • Is null or empty
  • Is true
  • Less than
  • Less than or equal to
  • Matches
  • --right Right Operand Only whenOperator is Equal_To, Greater_Than, Greater_Than_Equal_To, Less_Than, Less_Than_Equal_To, Contains, Ends_With, Begins_With, Matches Any Value used to evaluate the condition along with Left Operand and Operator.
    Value must be of the same type as Left Operand.
    --negate Negate Optional Boolean When enabled, negates the rule defined in Operator.

    Outputs

    Script Designer AcceptedTypes Description
    output Rule Rule Name of the rule used.

    Example

    Example 1: The Imply command uses the rule named "rule" to verify whether the variable "LeftValue" has a value greater than the variable "RightValue". If the condition is true, the value of the "LeftValue" variable is assigned to the "HighestValue" variable.

    defVar --name LeftValue --type Numeric --value 5
    defVar --name RightValue --type Numeric --value 3
    defVar --name HighestValue --type Numeric
    defVar --name rule --type Rule
    // Modify the value of "${HighestValue}" if "${LeftValue}" is greater than "${RightValue}".
    imply --name Greater --variablename "${HighestValue}" --value "${LeftValue}" --left "${LeftValue}" --operator "Greater_Than" --right "${RightValue}" rule=output
    logMessage --message "${rule}" --type "Info"
    logMessage --message "${HighestValue}" --type "Info"
    // After the operation, the name of the rule used (Greater) and the value assigned to the variable "${Highest}", which in this case is 5, is informed.
    

    Example 2:** The Imply command does the same check as **Example 1, this time, with the Negate parameter enabled.

    defVar --name LeftValue --type Numeric --value 5
    defVar --name RightValue --type Numeric --value 3
    defVar --name HighestValue --type Numeric
    defVar --name rule --type Rule
    // Modify the value of "${HighestValue}" if "${LeftValue}" is greater than "${RightValue}".
    imply --name Greater --variablename "${HighestValue}" --value "${LeftValue}" --left "${LeftValue}" --operator "Greater_Than" --right "${RightValue}" --negate rule=output
    logMessage --message "${rule}" --type "Info"
    logMessage --message "${HighestValue}" --type "Info"
    // After the operation, the name of the rule used (Greater) and the value assigned to the variable "${Highest}", which in this case is 5, is informed.
    

    See Also

  • Assert Condition
  • Assign Value to a Variable If
  • Else If
  • End Do-While
  • Go to If
  • Run Subroutine If
  • Set Key-Value Pair
  • Set Variable
  • Set Variables