Hide an empty field in 'Print View'
Hi,
I have an address that contains multiple fields. If I want to hide one of the fields that are empty in the `Print View' how do I do this.
For example, I have the fields 'Address Line 1' and 'Address Line 2'.
If only 'Address Line 1' has been entered, what formula is required to not display 'Address Line 2'.
Thanks, Paul.
6 replies
-
@Paul,
Hmm.. I am not aware that you can set "visibility" rules in the print layout .. as you can in the forms.. I do not do much printing.. so I am interested in the reply as well..
As a work around.. You could build a formula to build an "address".. thus .. including line 2 if populated, else exclude it.. :)
-
Thanks for the reply.
You mention building an address. I found an old post regarding creating an address block, that removes line breaks: (https://ninoxdb.de/en/forum/technical-help-5ab8fe445fe2b42b7dd39ee7/creating-an-address-block-from-different-fields-5cf46a93cdd5bd2503245b15)
This could work, as the address block field could be added to the print layout?
-
@Paul..
Yes.. that should work.. Wow.. I forgot I posted that.. LOL..
-
Just tested and it does work. Thank you!
-
At A Boy Paul!
Give a person a fish.. they eat for a day ..
Teach a person to fish....... ;)
-
My current "workaround" to not see empty fields in the PDF and if they are filled with a prepended text and final line break is:
let LineBreak := "
";
let InvoiceDateLabel := if text('Invoice Date') = "" then
""
else
"Invoice Date: " + 'Invoice Date' + LineBreak
end;
InvoiceDateLabel
the second "" after "then" is used to check the field "Invoice Date" ... the whole thing can be done with less lines of code.
Content aside
- 2 yrs agoLast active
- 6Replies
- 1543Views