Skip to main content
Mitratech Success Center

Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.

 

Using tc:conditional

There are many different ways to use tc:conditional to retrieve data, include static text, and/or import text from other files.

Comparing Custom Fields

The following are examples of how tc:conditional can be used to compare a custom field value with the value specified in the tag to include static text and retrieve data.

Date

<tc:conditional condition="greater" compare="Detail[CLAM]/ DetailValue[AwardDate],2003-01-01">Date Awarded: <tc:detail select="CLAM/AwardDate" /></tc:conditional>

Number

<tc:conditional condition="less" compare="Detail[CLAM]/ DetailValue[ClaimEstimate],10000">Claim Estimate: <tc:detail select="CLAM/ClaimEstimate" /></tc:conditional>

List

<tc:conditional compare="Detail[CLAM]/ DetailValue[Fatality],Yes">Unfortunately there was a fatality.</ tc:conditional>

Check Box

<tc:conditional compare="Detail[CLAM]/ DetailValue[PoliceInvolved],true">Police Involved: <tc:detail select="CLAM/PoliceOfficer" /></tc:conditional>

Text

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

Comparing Sub-objects

The following example will check to see if an assignee with the role `Supervisor' is added to the claim. If so, it will include the information nested within the tc:conditional tag. If not, nothing will be included.

<tc:conditional compare="System[Assignee],Adjuster">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></ tc:conditional>

The following example will loop through all of the assignees within the claim record to see if any of the assignees have the skill 'Adjuster' in their contact card. If so, it will include the information nested within the tc:conditional tag. If not, nothing will be included.

<tc:loop select="AssigneeList" qualifier="Type_TreePosition=PHON_BUS1"><tc:data select="User"><tc:data select="Contact"><tc:conditional compare="System[Skill],Adjuster">Please contact <tc:data select="FirstName" /> <tc:data select="Name" /> at <tc:loop select="PhoneList" qualifier="PHON_BUS1"><tc:data select="PhoneString" /></tc:loop> if you have any questions regarding your claim.</tc:conditional></tc:data></tc:data></tc:loop>

Testing for Existing Data

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>

Including Information When Certain Conditions Are Met

The following sample shows how tc:conditional can be used to include the appropriate pronoun based on the gender of an individual. In this sample, the pronoun he/she or his/her is based on whether the claimant is male or female.

 

<tc:document version="1.0" mime-type="application/msword" name="Conditional" xmlns:tc="http://www.w3.org/1999/XSL/Transform">

Header

<tc:header>

<tc:filter name="UserSelectedClaimant" searchCondition="Involved" displayString="Contact/FirstName;Contact/Name;DefaultCategory/Name" displayFormat="* * - *" label="Please select the Claimant"/>

</tc:header>

Content

<tc:content>

<tc:data select="Contact"><tc:data select="FirstName" /> <tc:data select="Name" />

<tc:loop select="AddressList"><tc:data select="Street" />

<tc:data select="City" />, <tc:data select="State" /> <tc:data select="PostalCode" /

</tc:loop>

Dear

<tc:data select="Prefix" /> <tc:data select="FirstName" />

<tc:data select="Name" /></tc:data>

We were notified of your recent auto accident with

<tc:filter select="UserSelectedClaimant"><tc:data select="Contact"><tc:data select="FirstName" /> <tc:data select="Name" />.

<tc:conditional compare="Detail[CONT]/DetailValue[Gender],Male">He</ tc:conditional><tc:conditional compare="Detail[CONT]/ DetailValue[Gender],Female">She</tc:conditional></tc:data></tc:filter> has reported that the accident occurred on <tc:detail select="CLAM_AUTO/ AccidentDate" />.

Based on

<tc:filter select="UserSelectedClaimant"><tc:data select="Contact"><tc:conditional compare="Detail[CONT]/ DetailValue[Gender],Male">his</tc:conditional><tc:conditional compare="Detail[CONT]/DetailValue[Gender],Female">her</ tc:conditional></tc:data></tc:filter> report the following people were involved in the auto accident.

<tc:search link="Involved"><tc:data select="Contact"><tc:data select="FirstName" /> <tc:data select="Name" /></tc:data> - <tc:data select="DefaultCategory/Name" />

</tc:filter>

Sincerely,

<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" /></tc:data></tc:data></tc:loop>
</tc:document>

  • Was this article helpful?