Jump to: navigation, search

Using a Complex Field Code

The following is an example of a complex field code:

<$ If (Time() - Interaction.DateCreated > 14, “Please accept our apologies for not having replied sooner. ”, “”) $>

This field code inserts a tardiness apology if more than 14 days have elapsed since the interaction first entered the system. It uses the function If, which has these properties:

  • Its syntax is If (Boolean, TrueResult, FalseResult)
  • If Boolean evaluates to True, it returns the second argument.
  • If Boolean evaluates to False, it returns the third argument.

In this example the three arguments of If are as follows:

  1. Time() - Interaction.DateCreated > 14 A formula that returns True if the difference between the date created and the current system time is more than 14 days. (The result of a mathematical operation on dates is given in days.)
  2. “Please accept our apologies for not having replied sooner. ” A text string apologizing for tardiness, inserted if the formula evaluates to True.
  3. The null string: if the reply is not late (the formula evaluates to False), nothing is inserted in it.
This page was last edited on December 17, 2013, at 18:53.
Comments or questions about this documentation? Contact us for support!