diff --git a/content/kapacitor/v1.5/tick/expr.md b/content/kapacitor/v1.5/tick/expr.md index 0d0229456..2bb91188d 100644 --- a/content/kapacitor/v1.5/tick/expr.md +++ b/content/kapacitor/v1.5/tick/expr.md @@ -355,15 +355,15 @@ The second and third arguments must return the same type. Example: ```js -|eval(lambda: if("field" > threshold AND "field" != 0, 'true', 'false')) +|eval(lambda: if("field" > threshold AND "field" != 0, 'high', 'normal')) .as('value') ``` -The value of the field `value` in the above example will be the string `true` or `false`, depending on the condition passed as the first argument. +The value of the field `value` in the above example will be the string `high` or `normal`, +depending on the condition passed as the first argument. The `if` function's return type is the same type as its second and third arguments. - ```js if(condition, true expression, false expression) ```