Page 1 of 1

Custom Template Condition List

Posted: Thu Sep 12, 2024 11:06 pm
by DGarza

Hi everyone,

Before I used the custom template, I have on Row_Rendered some conditions for change the background of my cell, but when I created my custom template, those conditions didn't apply

So, how can I add the same condition on custom template?

Thanks


Re: Custom Template Condition List

Posted: Thu Sep 12, 2024 11:36 pm
by DGarza

I tried with this on custom template

{{if {{{value Status}}} == "Baja"}}
       <td data-name="Status" class="bg-info">
             {{{value Status}}}
        </td>
{{else {{{value Status}}} == "Alta"}}
        <td data-name="Status" class="bg-warning">
             {{{value Status}}}
        </td>
{{/if}}

But I have and error


Re: Custom Template Condition List

Posted: Fri Sep 13, 2024 12:14 am
by arbei

Remember that {{{value fieldname}}} tag is HTML, you cannot use them in conditions, you should use {{{dbvalue}}}, read Custom Template Tags on how to use.


Re: Custom Template Condition List

Posted: Fri Sep 13, 2024 1:02 am
by DGarza
<td data-name="Status" class="bg-success">
{{: {{{dbvalue Status}}} }}
</td>

This is the correcto syntax, now i need to figure out how to implement this in a if.