User Tools

Site Tools


syntax:functions:when

when(condition, expression)

Returns the result of expression if condition is true. Otherwise returns empty value. This function is effectively a shorthand for if(condition, expression, empty())

Example Result
when( 2 + 2 = 4, 'Makes sense') Makes sense
when( 1 + 1 = 4, 'Makes sense')
syntax/functions/when.txt · Last modified: 2016/06/08 04:19 by dmitry