Skip to content

Condition

Miriam McMahon edited this page Apr 27, 2023 · 11 revisions

Description

Runs logic based on evaluation of an expression.

Parameters

Parameter Name Description Type Resolved Type Required
If The condition to evaluate. This must be a valid inline expression, so it doesnt need the %{}% markers. Quotes must be escaped with a backslash. Value Boolean Yes
Then The block of commands to execute if true Do Block Do Block Yes
Else The block of commands to execute if false Do Block Do Block No

Examples

Example:

{
  "Condition": {
    "If": "Regex.IsMatch(LoginCheckBuffer, @\"(Password change required)|(Password expired)\")",
    "Then": {
      "Do": [
        {
          "Return": { "Value": true }
        }
      ]
    },
    "Else": {
      "Do": [
        {
          "Return": { "Value": false }
        }
      ]
    }
  }
}