IF is "Item Type" (Netsuite)
I need to indicate if a specific customer order has ANY inventory items (if yes, this will display specific formatting information in PDF / HTML format)
I cannot use line or java code or any type of client side encoding, so I need a way to do this using a custom field and / or encoding the PDF / HTML itself.
+3
Simon g
source
to share
2 answers
Alternatively, if you do not need to count all items and want to exit the loop as soon as you find the first item in your inventory, you can use <#break>
:
<#assign hasInventoryItem = false>
<#list record.item as item>
<#if item.itemtype == "InvtPart">
<#assign hasInventoryItem = true>
<#break>
</#if>
</#list>
<#if hasInventoryItem == true>
(your code here)
</#if>
+1
erictgrubaugh
source
to share
<#assign numberInventoryItems = 0>
<#list record.item as item>
<#if item.itemtype == "InvtPart">
<#assign numberInventoryItems = numberInventoryItems + 1>
</#if>
</#list>
<#if numberInventoryItems gt 0>
(Your code here)
</#if>
+4
michoel
source
to share