Calculation field: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 121: Line 121:
! Function !! Arguments !! Returns
! Function !! Arguments !! Returns
|-
|-
| '''if''' || expression,<br/>value if TRUE,<br/>value if FALSE || 3 arguments<br/>One value if a logical expression is TRUE (not equal to 0.0)<br/>and another if it is FALSE (equal to 0.0)<br/>Read it as "If expression is true, then value 1, else value 2"<br/>Example: if(#{remaining} == 0, 'Done', 'Incomplete')
| '''if''' || ''expression,<br/>valueIfTrue,<br/>valueIfFalse'' || 3 arguments<br/>One value if a logical expression is TRUE (not equal to 0.0)<br/>and another if it is FALSE (equal to 0.0)<br/>Read it as "If ''expression'' is true, then ''valueIfTrue'', else ''valueIfFalse''"<br/>Example: if(#{remaining} == 0, 'Done', 'Incomplete')
|-
|-
| '''switch''' || expression,<br/>value/result pairs,<br/>default result || 1+(2*#pairs)+1 arguments<br/>The final result based on matching the expression against the paired values to identify the paired result (or else the default result) to be used<br/>Example: switch(#{count}, 1, 'One', 2, 'Two', 'Many')
| '''switch''' || ''expression,<br/>valueResultPairs,<br/>defaultResult'' || 1+(2*#pairs)+1 arguments<br/>The final result based on matching ''expression'' against the paired '''values''' to identify the paired '''result''' (or else ''defaultResult'') to be used<br/>Example: switch(#{count}, 1, 'One', 2, 'Two', 'Many')
|}
|}


Navigation menu