Changes

Jump to: navigation, search

Template / Type Formula

621 bytes added, 16:03, 6 October 2016
no edit summary
==Using Conditional Statements==
===IF Else Condition===
Conditional statements can be used in formulas with the following structure:
Note that the criteria for the ''if'' statement are first referenced as ''?'' marks, then the ''if'' statement is separated from the criteria values using '':=:'', then the separate criteria values are separated by '':,:''
 
===Case When Condition===
You can also use the '''Case''' syntax:
 
:<font size="3">'''@variable1@=CASE @variable2@ WHEN ''condition 1'' THEN ''value for condition 1'' WHEN ''condition 2'' THEN ''value for condition 2'' WHEN ''condition 3'' THEN ''value for condition 3'' ELSE ''value if not in any condition''END<end>'''</font>
 
OR
 
:<font size="3">'''@variable1@=CASE WHEN @variable2@ ''in (list items)'' THEN ''value for condition 1'' WHEN @variable2@ ''in (list items)'' THEN ''value for condition 2'' WHEN @variable2@ ''in (list items)'' THEN ''value for condition 3'' ELSE ''value if not in any condition''END<end>'''</font>
 
 
===Examples===
@level1.Notice Text@=CASE '@level1.status@' WHEN 'Status 1' THEN 'Submission Cutoff is March 5th.' WHEN 'Status 2'
THEN 'Thank for your submission' WHEN 'Status 3' THEN 'Congratulations' ELSE 'I have no comment' END;
 
===Examples===
* At Level 2: if the field called ''locationpreference'' says "Home" put the value in the ''homeaddress'' field into '''Location'''. Otherwise put the value from the ''worksaddress'' field into '''Location'''.
Smartstaff
1,385
edits

Navigation menu