Multi-select field titles in Bullet Point List



  • Guy Dee
    Zendesk team member

    Hi Tamara!

    This is fortunately very possible, and pretty simple to do! Through use of the Liquid split filter we can divide this comma-separated list into an array, and then display the items in that array in a bulleted list.

    Please note that the Liquid markup language is not a Zendesk technology, and our customer support team doesn't support it directly. Typically we defer in-depth questions about Liquid markup to Shopify, who created the markup language, or to their documentation. Just for you, though, I've taken the liberty of setting this up in my test account to verify that it works, and I'm happy to share what I've found!

    Here's the Liquid statement that gets you what you're after. Replace [field_id] with your desired field ID:

    {% assign options = ticket.ticket_field_option_title_[field_id] | split: ", " %}

      {% for member in options %}
        <li>{{ member }}</li>
      {% endfor %}

    What this does is sets a variable, "options", to be the value of the multi-select ticket field. It then splits this variable at each comma, so now we have an array of options instead of just a single-line list.

    The next piece opens an HTML unordered list, then for every member of the array we just created, adds a list item. Last we close up the unordered list and we're all set!

    Note that in triggers, the line breaks in this statement will be rendered in the email output and create a lot of whitespace, so when you actually implement this you'll want to place all the code on a single line. For your field ID, here's something you can copy/paste directly into your trigger:

    {% assign options = ticket.ticket_field_option_title_360003324740 | split: ", " %}<ul>{% for member in options %}<li>{{ member }}</li>{% endfor %}</ul>

    I hope this helps!

  • Brett Bowser
    Zendesk Community Team

    Hi Tamara Tankosić

    I just wanted to let you know that we've turned your awesome question into a Help Center article :)

    How do I display multi-select field values as bullet points?

    Thanks for joining the AMA, and keep the great questions coming! 


Please sign in to leave a comment.

Powered by Zendesk