I am trying to remove part numbers that contain th...
# advancedpdf
s
I am trying to remove part numbers that contain the word NOTE while leaving any other description item
s
i think the function youre looking for is strpos(). But idk how you would do it in HTML/CSS or if there is an equivalent function.
s
You might be able to use the
?contains
directive to detect the word NOTE and selectively exclude it.
<#if !item.field?contains('NOTE')>${item.field}</#if>
Reference: https://freemarker.apache.org/docs/ref_builtins_string.html#ref_builtin_contains
s
Ah yes thats what i was trying to find for Scotty. Ill need to save this list of built-ins for myself. Thanks @scottvonduhn
s
The only challenge with the documentation is that Netsuite isn’t on the very latest version, so some of the built-ins don’t work. I haven’t tested this one out yet.
s
90% sure used ?contains with success before in the past few months.
s
I will try that
I used ?contains("note") ==false and it didnt work
s
are you using the right case?
s
I tried all cases
got it. !item.item?contains("Note") worked
s
yea i was going to say that im not sure if it recognises
==false
logic.
👍
s
Its an older longer version of doing the same thing
I used it in the past to remove all description items because they only used description items for notes and nothing else. This company uses them for a lot of text on the order
s
too many languages with too much syntax to remember 😵
s
yep. Also this is versions behind the rest of the world so its even worse
true news 1
k
why not just add a checkbox to the item and use that as your test?
s
Cant add fields to description items... Tried that