IF
returns one value if true, and another if false; both are provided by arguments.
Function category: Logical​
IF(arg1, arg2, arg3)
Arguments | Description |
| Condition that returns a value that can be interpreted as true or false. |
| Value returned when |
| Value returned when |
Let's say we're given a response with the following fleet deployment information.
{"company_a": {"deployed": true}}
If we want to yield responses dependent on fleet deployment, use the following function.
# Yield a response based on the value of conditionIF(company_a.deployed = TRUE, "Deployed and ready!", "Not deployed, not ready")​# Returns "Deployed and ready!"# This is because arg1 resolves to TRUE