Custom Template with JsRender issue

Hello,

I had this part of code which worked ok with all previous versions of ANM (we have a ticketing solution which was converted from 2021→ 2023, 2021→ 2024 which worked perfectly fine after conversion)

<div class="chat-text">{{{tkre_vc_response}}} {{if ({{{dbvalue tkre_vc_attachment_file}}} }}<hr/>{{{tkre_vc_attachment_file}}}{{/if}}</div>

So, for each response the user/admin can upload a file (or multiple files).
I wanted to show in the answer the files only if the column had a value.

Now it does not display anything, whether the tkre_vc_attachment_file has a value or if it NULL

I have tried variations like

<div class="chat-text">{{{tkre_vc_response}}} {{if ({{{dbvalue tkre_vc_attachment_file}}} !== null && {{{dbvalue tkre_vc_attachment_file}}} !== "") }}<hr/>{{{tkre_vc_attachment_file}}}{{/if}}</div>

But this one, for example, it just shows me the part which was supposed to be hidden when tkre_vc_attachment_file is null

Try showing the value first. For example:

{{: {{{dbvalue field}}} }}

Also press F12 →Console to check if there is any console error.

Here is an example:

<div class="chat-text">{{{tkre_vc_response}}}<span>{{: {{{dbvalue tkre_vc_attachment_file}}} }}</span><div class="chat-file"><hr/>{{{tkre_vc_attachment_file}}}</div></div>

And the output

<div class="chat-text"><span id="el8_HDSupportTicketsResponses_tkre_vc_response" class="el_HDSupportTicketsResponses_tkre_vc_response" style="white-space: pre-wrap;">test</span><span></span><div class="chat-file" style="display: none;"><hr><span id="el8_HDSupportTicketsResponses_tkre_vc_attachment_file" class="el_HDSupportTicketsResponses_tkre_vc_attachment_file"></span></div></div>

As you can see there nothing in span