Umar Naeem
02/15/2024, 12:27 PMal3xicon
02/15/2024, 3:02 PMeval
function - it isn't officially supported but I use it with good successal3xicon
02/15/2024, 3:03 PMDavid B
02/19/2024, 8:15 PM?eval
and at the bottom of ?eval_json
al3xicon
02/19/2024, 8:33 PMDavid B
02/19/2024, 8:56 PM?eval_json
myself as it wasn't available at the time (back when NS was using v2.3.26
)al3xicon
02/19/2024, 8:57 PMal3xicon
02/19/2024, 8:58 PM?eval
worked for me, it always gives me an error when I save the PDF template which makes me very uneasyDavid B
02/19/2024, 9:16 PM?has_content
), even though you know that the data is going to be valid JSONal3xicon
02/19/2024, 9:26 PM?has_content
check in there but it likely needs something more robust for the validation - the error i see is
Failed to "?eval" string with this error:
---begin-message---
Syntax error in ?eval-ed string in line 1, column 8:
Encountered "ipsum", but was expecting one of these patterns:
"."
".."
<DOT_DOT_LESS>
"..*"
"?"
"??"
"!"
"["
"("
")"
<TERMINATING_EXCLAM>
---end-message---
al3xicon
02/19/2024, 9:26 PMDavid B
02/19/2024, 9:29 PM<#if !record.field?starts_with('Lorem ipsum')>${record.field?eval}</#if>
😅al3xicon
02/19/2024, 9:32 PMDavid B
02/19/2024, 9:34 PM