Is anyone good at working with Freemarker code and...
# advancedpdf
k
Is anyone good at working with Freemarker code and have any availability to video chat. I am trying to filter record items based on a field value.
k
Do you mean that you only want items to appear in the item list of the PDF if there is a certain value in a specific column field?
n
.filter is available since Freemarker version 2.3.29 I am not sure if NetSuite is using this or earlier version of Freemarker.
k
Yes that is truee. I want the items to display if there have a back ordered value greater than @kennkerp
n
NetSuite is using 2.3.26
k
@NickSuite So that means filter doesn't work?
n
Correct. It won't work.
In your PDF, add this ${‌.version} and see what value does it print.
This will give you the freemarker version used by NS
k
any ideas then on how to filter them items back on a field value being greater than 0
n
You can use if/else to filter out the items
k
the version is 2.3.32
😮 1
n
😮
Is that the value from the ${.version}?
k
yes, do you have time to video chat? @NickSuite
n
I am heading out for now. I can ping you when I am back.
k
OK thank you @NickSuite
n
Meanwhile, try to assign it a different variable and use that for list.
<#assign filteredItem = record.item?filter(item -> item.quantitybackordered gt 0)>
k
lmk if you're able to get filter to work. I always used if/else for this purpose like Nick said. Happy to lend a hand there if you need it.
k
@NickSuite. I have attempted the code you have given me and I cant get it to work. Are you still avialable for a converstion? @kennkerp
d
what's going on with this line?