Show/Hide Toolbars

The following samples show how tc:conditional is used to see if data exists for system fields or sub-objects. If data exists, the nested information is included. If not, nothing is included.

Testing System Fields

The following example will test to see if the claim is closed. If so, it will include the static text and the date that the claim was closed.

<tc:conditional test="ClosedOn">Your claim was closed on <tc:data select="ClosedOn" />.</tc:conditional>

The following example will test to see if the claim is linked to a policy. If so, it will include the static text and the policy number.

<tc:conditional test="Parent">This claim is in regards to Policy Number <tc:data select="NumberString" />.</tc:conditional>

Testing Sub-objects

The following example will test to see if any assignees are assigned to the claim. If so, it will include the static text and loop to find all the assignees with the role `Adjuster' and bring in the nested information.

<tc:conditional test="AssigneeList">Please contact your claim adjuster <tc:loop select="AssigneeList" qualifier="Type_TreePosition=CLAM_ADST"><tc:data select="User"><tc:data select="Contact"><tc:data select="FirstName" /> <tc:data select="Name" /> at <tc:data select="DefaultPhone/PhoneString" /></tc:data></tc:data></tc:loop>if you have any questions.</tc:conditional>

The following example will test to see if the claim includes the category `Auto'. If so, it will include the static text in the letter and retrieve data from the specified system and custom fields.

<tc:conditional test="Detail[CLAM_AUTO]">We have the following information about your auto accident.

Date of Accident: <tc:detail select="CLAM_AUTO/AccidentDate" />

Loss Location: <tc:detail select="CLAM/LossLocation" />

Claimant: <tc:detail select="CLAM_AUTO/Claimant" />

Policy Number: <tc:data select="Parent"><tc:data select="NumberString" /></tc:data></tc:conditional>