It may be necessary to perform an operation if a field is empty. An example would be to set the print attribute of a label field to false if the corresponding value is not passed in the data. Below are two examples of how this can be accomplished and some issues that can be encountered.
Normally you would assume that if the value is not passed in the data that you could use the following conditional:
The above conditional would evaluate as false and 'LABELFIELD' would still print.
However, when the Java script engine is run, and all the variables are created as "empty", the following conditional would evaluate as true and 'LABELFIELD' would not print.
Page:Evaluating Empty Fields using Field Level Scripting - Null vs Empty (Loftware Print Server Family Knowledge Base)
Page:Label Fields Named "Version" Not Printing After Upgrade (Loftware Print Server Family Knowledge Base)
All supported LLM/LPS versions.
All supported installation environments.