Custom Quote Template Beta

Bob2245
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

Containing operator not working?

So, I'm creating a custom quote template where the sales rep can decide whether they want to display certain price specifications on the quote or not. So my deal object has a bunch of pricing properties and a multi-select property where the rep can tick the pricing properties he wants to display on the deal. 

 

In my code, I've got that property loaded in as follows: 

 

 

{% set DEAL = ASSOCIATED_OBJECTS.deal %}
{% set DoQ = DEAL.display_on_quote|split(",") %}

 

 

This seems to work alright, because a pprint on DoQ displays the values that are ticked in the field: 

Bob2245_0-1646662216803.png

 

Now in the list below it, I want to show items for Telematics and Road Tax if their checkbox is ticked in the property, so per this documentation I did this:

 

 

 {% if DoQ is containing road_tax %}
      <div class="totals__row">
        <div>Road Tax</div>
        <div class="dotted__row"></div>
        <div>{{ DEAL.road_tax|round|format_currency("en-IE", "EUR") }}<br></div>
      </div>
      {% endif %}

 

 

But even though the road tax property has a value, and road tax is displayed in my custom variable, this doesn't trigger the HTML to show. 

 

EDIT: Should add I've also tried these:

 

{% if DoQ is containing "road_tax" %}
{% if DoQ is containing 'road_tax' %}

 

But no dice on either of them. 

 

Any idea what I'm doing wrong here?

 

1 Reply 1
amin-laanaya
Participant

Containing operator not working?

Did you end up solving this, Bob?
I'm having issues with these operators as well.

0 Upvotes