Introduction to Comparison Functions
Comparison functions in the Viewer App serve as a fundamental feature that empowers users to compare content effortlessly. Whether you are a researcher, designer, or analyst, these functions play a crucial role in facilitating detailed comparisons. With just a few clicks, users can overlay, zoom in, or toggle between multiple items, enabling a comprehensive analysis. For example, in a design project, users can compare different versions of a graphic to identify changes or improvements easily.
Moreover, comparison functions enhance collaboration by allowing users to share and discuss insights based on the comparisons made. This feature promotes a streamlined workflow, as team members can quickly review and provide feedback on various elements within the content. Ultimately, comparison functions simplify the process of analyzing content and help users make well-informed decisions.
Important Notice
Viewer does not protect your calculation from missing data or null, in any case that the data is missing / blank / null the document will fail and return error.
Please verify default values or preform the calculation in Salesforce
eq
Show a block if a
is equal to b
{{eq Account.Type 'Other' }}
Show only when Type is "Other"
{{/eq}}
<!-- results results when Account.Type='Other': Show only when Type is "Other" -->
{{eq Account.Type 'Other' }}
Show only when Type is "Other"
{{else}}
Show only when Type is NOT "Other"
{{/eq}}
<!-- results results when Account.Type='Other': Show only when Type is NOT "Other" -->
unlessEq
Show a block if a
is NOT equal to b
{{unlessEq Account.Type 'Other' }}
Show only when Type is NOT "Other"
{{/unlessEq}}
<!-- results when Account.Type='New': Show only when Type is NOT "Other" -->
{{unlessEq Account.Type 'Other' }}
Show only when Type is NOT "Other"
{{else}}
Show only when Type is "Other"
{{/unlessEq}}
<!-- results when Account.Type='New': Show only when Type is NOT "Other" -->
lt
Show a block if a
is less than b
{{lt 1 2 }}
Show only when 1 is less than 2
{{/lt}}
<!-- results in: Show only when 1 is less than 2" -->
{{lt 2 2 }}
Show only when 2 is less than 2
{{else}}
Show only when 2 is not less than 2
{{/lt}}
<!-- results in: Show only when 2 is not less than 2 -->
lte
Show a block if a
is less than or equal b
{{lte 1 2 }}
Show only when 1 is less or equal than 2
{{/lte}}
<!-- results in: Show only when 1 is less than 2" -->
{{lt 2 2 }}
Show only when 2 is less than or equal 2
{{else}}
Show only when 2 is not less than or equal 2
{{/lte}}
<!-- results in: Show only when 2 is less than or equal 2 -->
gt
Show a block if a
is greater than b
{{gt 2 1 }}
Show only when 2 is greater than 1
{{/gt}}
<!-- results in: Show only when 2 is greater than 1" -->
{{gt 2 2 }}
Show only when 2 is greater than 2
{{else}}
Show only when 2 is not greater than 2
{{/gt}}
<!-- results in: Show only when 2 is not greater than 2 -->
gte
Show a block if a
is greater or equal to b
{{gte 2 1 }}
Show only when 2 is greater or equal to 1
{{/gte}}
<!-- results in: Show only when 2 is greater or equal to 1" -->
{{gte 2 2 }}
Show only when 2 is greater or equal to 2
{{else}}
Show only when 2 is not greater or equal to 2
{{/gte}}
<!-- results in: Show only when 2 is greater or equal to 2 -->