Nour Khaled
05/01/2025, 7:17 AMCeligo AI
05/01/2025, 7:17 AMAI generated answer (using internal Slack threads):To add a condition in Freemarker to check if a date field is before 30/04/2025 and then display a specific piece of code, you can use the following code:
freemarker
<#if record.dateField?has_content && (record.dateField?date < "2025/04/30")>
<p> </p>
<#else>
<barcode id='qrcode' align='center' codetype="qrcode" showtext="true" height="80" width="80" value="${record.custbody_psg_ei_qr_string}"/>
<!-- ${record.custbody8} -->
</#if>
In this code, record.dateField
should be replaced with the actual field name of your date field. The ?has_content
checks if the field has a value, and the ?date
converts the field value to a date. The <
operator is then used to compare the date field value with the date "2025/04/30".
Please note that the date format used in the comparison should match the date format of your date field.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
05/01/2025, 7:17 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.837684
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.819906175
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.8102
Celigo AI
05/01/2025, 7:17 AM