Clarity Service Management

Expand all | Collapse all

Conditional logic on message templates

Jump to Best Answer
  • 1.  Conditional logic on message templates

    Posted 09-17-2015 01:24 PM

    Hi Community!

     

    I'm working on rebuilding the OOTB html message templates.  I was wondering if anyone has added conditional logic to these forms?  For example, the ability to only show fields that are not null.  I was thinking this is probably not possible but wanted to confirm.



  • 2.  Re: Conditional logic on message templates
    Best Answer

    Posted 09-18-2015 03:45 AM

    As far as i know there is no possibility to do that



  • 3.  Re: Conditional logic on message templates

    Posted 09-18-2015 04:00 AM

    This is not that you are actually looking for, but this can make a trick, you can use "height=0" to hide empty table cells.

    I'm using this trick to hide empty lines, but there is no way to hide Header field if there is no data under it.

    Example:

    <tr>
      <td colspan=2 style="padding: 4px 0px 2px 4px; BACKGROUND: #ecf2f8; border: 1pt solid;">
      Properties:
      </td>
    </tr>
    <tr height="0">
      <td width="50%">
      @{esc_style=html justify=line:change_id.properties.0.label}
      </td>
      <td width="50%">
      @{esc_style=html justify=line:change_id.properties.0.value}
      </td>
    </tr>
    <tr height="0">
      <td>
      @{esc_style=html justify=line:change_id.properties.1.label}
      </td>
      <td>
      @{esc_style=html justify=line:change_id.properties.1.value}
      </td>
    </tr>
    


  • 4.  Re: Conditional logic on message templates

    Posted 09-18-2015 11:12 AM

    Thanks for the tip CDTJ,

     

    I might be able to use your suggestion.