Ticket Field Option in Dynamic Content

2 Comments

  • Pedro Rodrigues
    Community Moderator

    Hi Ali van de Poll, you need to specify a condition for the empty value ("-") using Liquid:

    {% case ticket.ticket_field_option_title_24846001 %}
    {% when "-" %}
    <p>Hi,</p>
    {% else %}
    <p>Hi {{ticket.ticket_field_option_title_24846001}},</p>
    {% endcase %}

    Hope this helps!

    0
  • mccabe.tonna
    Community Moderator

    @Ali van de Poll 

    I had a similar issue where the user's name was either their name or their email address

    Instead of having a separate field, why not utilize the requester's name?

    I created a liquid-markup dynamic content field that accomplishes something similar

    I named the Dynamic content "name" so referencing it is {{dc.name}} on all macros and content

    {% if ticket.requester.email == ticket.requester.name %} there{% else %} {{ticket.requester.first_name}}{% endif %}

    Example: Hi {{dc.name}},

    produces, Hi there, or Hi McCabe,

     

    Similarly you could remove the "there" portion and leave it blank

    0

Please sign in to leave a comment.

Powered by Zendesk