skip empty contact fields in invoice print
Hi Support,
I'm designing a invoice print layout and it would be nice if the name, address, email etc. fields of the contact won't leave a blank line when they are empty. For instance, when a contact does not belong to a company:
Not:
John Doe
Kerkstraat 4
3042 DR, Dordrecht
johndoe@email.com
06 12345678
But:
John Doe
Kerkstraat 4
3042 DR, Dordrecht
johndoe@email.com
06 12345678
Thanx in advance
Daniël,
Rotterdam, The Netherlands
5 replies
-
I see that my example does not work becouse soft enters are not supported in this email. I hope you my question is clear never the less.
Regards,
Daniël
-
Maybe with different printlayouts? I also wonder for the correct way. Anyone?
-
I think I figuered it out myself. I used one formula in a text frame to generate all the lines. Basically it works this way:
If a record exists then print it and start a new line, else do nothing.
Something like this:
if Customer.Organization then
Customer.Organization + "
"
else
null
end + if Customer.Organization then
"attn" + " " + Customer.'First Name' + " " + Customer.'Last Name' + "
"
else
Customer.'First Name' + " " + Customer.'Last Name' + "
"
end
etc.
If there is a more elegant way of doing this I realy would like to know. But anyway this works for me now.
-
I've tried 'null', and I still get a new line/carriage return.
-
Hey,
Perhaps Mconneen has a solution for this a few posts back: https://ninoxdb.de/en/forum/technical-help-5ab8fe445fe2b42b7dd39ee7/creating-an-address-block-from-different-fields-5cf46a93cdd5bd2503245b15
Content aside
- 5 yrs agoLast active
- 5Replies
- 1986Views