Vishal Chaudhari
03/17/2025, 3:13 PMCeligo AI
03/17/2025, 3:14 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems you are trying to use an if condition with order_index and list order.index value in a Freemarker template. You can use the
<#if>
directive in Freemarker to check conditions.
For example, if you want to check if the order_index
is not zero, you can do something like this:
freemarker
<#if order_index != 0>
// Your code here
</#if>
You can also use logical operators like &&
(and), ||
(or) to combine conditions. For example:
freemarker
<#if order_index != 0 && order.amount > 0>
// Your code here
</#if>
If you want to filter out items in a list, you can use the <#list>
directive with an if condition. For example:
freemarker
<#list salesOrders.salesOrders as order>
<#if order.amount > 0>
// Your code here
</#if>
</#list>
This will only execute the code inside the if condition for orders with an amount greater than zero.
******
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
03/17/2025, 3:14 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.782606781
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.773474872
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.770601
Celigo AI
03/17/2025, 3:14 PM