60
Word Templates
Creating an IF Field - Conga Best Practices
Especially when comparing the values of merge fields, there are a few best practices to
follow when creating IF fields in a Composer Word template. For example, if an
Opportunity's Amount is great than $10,000, we want to show information about a
complimentary service package. If it's not, we do not want to show anything. Using this
example, we recommend using the following approach:
Procedure Step
Result (noted in bold)
)
Create a traditional merge field with a
a
placeholder name.
«IF_Amount»
Toggle open the field codes.
{ MERGEFIELD IF_Amount \*
*
MERGEFORMAT}
Delete the contents of the field,
entering IF instead.
{ IF }
}
Add Expression1 to the IF field. In
In
our example, Expression1 is the
Opportunity Amount field.
{ IF "«OPPORTUNITY_AMOUNT»" }
}
Insert your Operator. We're using
g
greater than (>).
{ IF "«OPPORTUNITY_AMOUNT»" > }
}
Insert Expression2. Our example is
s
$10,000.
{ IF "«OPPORTUNITY_AMOUNT»" > "10000" }
" }
Insert TrueText. Our example is a
a
merge field that displays the details of
a complimentary service package.
{ IF "«OPPORTUNITY_AMOUNT»" > "10000"
000"
"«OPPORTUNITY_SERVICE_PACKAGE»" }
Insert FalseText. In our example, we
, we
don't want to display anything if the
Opportunity Amount is less than
$10,000 so our FalseText is null,
which is a pair of double quotation
marks.
{ IF "«OPPORTUNITY_AMOUNT»" > "10000"
10000"
"«OPPORTUNITY_SERVICE_PACKAGE»" "" }
Our finished IF field looks like this:
Or, if we toggle the field codes closed, it will revert to the merge field with the placeholder name:
© 2015 Conga
Release 8
87