Informazioni su Liquid markup e Zendesk Support



Data ultima modifica: 19 mar 2025


39

0

65 commenti

      Hi! Thank you so much!! I'm still having a bit of trouble so I'm going to share the full code I've been using. The code below doesn't populate anything but a “-”. I'm sure it has something to do with the {% when nil %} line, but when I try changing the statement to {% if ticket.ticket_field_option_title_XXXX = blank/nil/null/empty %} it doesn't do anything. 

       

       Any feedback/suggestions are appreciated. 

       

      {% case ticket.ticket_field_option_title_xxxx %}
      
      {% when nil %}
      {{ticket.requester.custom_fields.field_name}}
      {% else %}
      {{ticket.ticket_field_option_title_xxxxx}}
      {% endcase %}

      0


      how to use liquid markup when a text field is blank

      Can you try it with lowercase “null”:

      {% if my_field == null %}XYZ{% else %}ABC{% endif %}

      0


      Hannah Lucid 

      Possibly…

       

      {% if field_name != blank %}

      0


      Hi Hannah Lucid ,

       

      Try “nil” or “empty” instead of “NULL”

      0


      Hey There,

       

      It's me again! I was wondering if anyone knows how to use liquid markup when a text field is blank. I've tried using statements like != ‘-’ or != NULL , etc. but I'm struggling to figure it out. Is this possible? If so, how would I achieve this?

      Basically, we are using webhooks to update subject lines when a specific topic is selected. I wanted to keep the double dash (TOPIC NAME - -) when the text field is blank so it will look cleaner, like (TOPIC NAME). 

       

      Thank you so much!

      0


      Is it possible to use liquid markup in zendesk on the new object type (custom objects) Thank you

      0


      Thanks Jacob the Supporter - I had a feeling this was going to be the solution but for some reason preferred to bash my head against a wall for a while. This works great, thank you for the help! 

      1


      Hi Dylan Tragjasi 

      Aside from using the end user form name, it looks like you're missing part of the form name placeholder.

      Try and see if the below works for you.
      {% if ticket.ticket_form == "Form 1" %}
      Hello
      {% elsif ticket.ticket_form == "Form 2" %}
      World
      {% endif %}
       

      1


      Does anyone know if the ticket form object is accessible when using liquid markup? I'm trying to create a macro with different content depending on the current form selected on the ticket. I've tried many variations of the following but can't seem to get it to work:

      {% if ticket.form == "Form 1" %}
      Hello
      {% elsif ticket.form == "Form 2" %}
      World
      {% endif %}

      Using the ticket.ticket_form placeholder doesn't seem to work either. Any advice? Thank you!

      0


      Rafael Santos ah of course! I was overthinking this, believing I had to add the exclusion to the JSON when of course I can just add it to the main trigger. Thank you!

      0


      Accedi per lasciare un commento.