Changes

Template / Type Formula

435 bytes added, 18:27, 23 September 2009
Using IF Statements
'''IMPORTANT''': You can use single quotes instead of double quotes, but if there is a single quote mark stored within one of the variables it will stop the concatenation of the string. Similarly using double quotes will provide incomplete results if one of the variables stores text that includes a double quote.
==Using IF Conditional Statements==If Conditional statements can be used in formulas with the following structure::<font size="3">'''@variable@=if(''conditional statement'',''value if true'',''value if false');'''</font>
 
'''Examples:'''
 
 
 
To populate the end date with today's date if the status is closed and there is not already a date entered as the end date. If there is already an end date leave it there (Level 1):
@opportunity.enddate@=
if('@opportunity.status@'='Closed' and ('@opportunity.enddate@'='&#39; or '@opportunity.enddate@' regexp '@|0000'),
date_format(now(),'%Y-%m-%d'),
'@opportunity.enddate@');
[[Category:Universal Tracking Application]]
0
edits