Show/Hide Toolbars

The compare attribute of tc:conditional is useful for comparing a custom field to a value that you specify in the tag. If the custom field has the value that you specify, then the condition is found to be true, and the content nested within the tc:conditional tag is generated.

You can use compare with the following types of custom fields. For each type of custom field, you must provide the value of the compare tag attribute in the specified format.

Tag Attribute Value Formats for Comparing Custom Fields

Custom field type

Format of value

Example tag

Check-box

true

or

false

<tc:conditional compare="Detail[CLAM]/DetailValue[PoliceInvolved],true">

Number

Value must be typed as an integer (without decimals or commas)

<tc:conditional compare="Detail[CLAM_AUTO]/DetailValue[ClaimEstimate],10000" condition="greater">

Text

Exact text that you want to compare

<tc:conditional compare="Detail[CLAM]/DetailValue[LossLocation],Near Residence">

List

The name of the lookup table item.

<tc:conditional compare="Detail[CLAM]/DetailValue[Fatality],Yes">

Caution: If the lookup table item name has a comma in it, then this tag will not function properly.

Date

YYYY-MM-DD

<tc:conditional compare="Detail[CLAM]/DetailValue[AwardDate],2003-02-26">

Example:

<tc:conditional compare="Detail[CLAM]/DetailValue[DrunkDriver],true">

<tc:file select="Statutes/DrunkDriverStatute.xml" />

</tc:conditional>

<tc:conditional compare="Detail[CLAM]/DetailValue[Speeding],true">

<tc:file select="Statutes/SpeedingStatute.xml" />

</tc:conditional>

In this example, the custom fields DrunkDriver and Speeding are check-boxes within the project Claim. The values specified for each is true, meaning that if a check-box is checked, then the XML file specified for that field will be included in the generated document. For example, if the DrunkDriver check-box is checked, the XML file DrunkDriverStatute is included in the generated document since the true condition that you specified was met.