km_add_if_variable_contains
Adds an If-Then-Else action to a macro that checks if a variable contains a specified value and executes conditional actions.
Instructions
Add an If-Then-Else action that checks if a variable contains a value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| macroIdentifier | Yes | Macro name or UID | |
| variable | Yes | Variable name to check | |
| containsValue | Yes | Value to check if variable contains | |
| thenActionsXml | No | Optional: XML actions for true condition. Pass one or more <dict>...</dict> elements concatenated (they get wrapped in <array>). Example: <dict><key>MacroActionType</key><string>Notification</string><key>Title</key><string>Hi</string><key>Text</key><string>Msg</string></dict> | |
| elseActionsXml | No | Optional: XML actions for false condition. Same format as thenActionsXml. |