Append text if variable <> ""

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
outlawbl
Newcomer
Posts: 2
Joined: Wed Jul 08, 2020 10:08 am

Append text if variable <> ""

Post by outlawbl » Wed Jul 08, 2020 11:25 am

Hi, i have label with variable length and for example 10 text boxes binded to 10 variables. Now i want to append text boxes one below other but only if variable is not empty, so i can spare paper. Is there any way to do that. Version is 17.2

User avatar
Saso
NiceLabel
NiceLabel
Posts: 2984
Joined: Mon Sep 04, 2006 8:09 am
Contact:

Re: Append text if variable <> ""

Post by Saso » Wed Jul 08, 2020 11:42 am

When you provide no value for a variable, the text box linked to that variable will simply not display on the label.

Now, to save paper, you can configure label objects to move their positions. E.g. Text Box 2 is linked to Text Box 1 and Text Box 3 is linked to Text Box 2. When Text Box 2 does not appear on the label (because you provided no value to its variable), the Text Box 3 will move in its place.

See the Relative Position option in object's properties.
screenshot.png
screenshot.png (52.37 KiB) Viewed 128 times
Also see the attached label template created in 2019 (you should be able to open it in 2017).
Preview the label and remove default value for variable "Text Box 2" and see how value for "Text Box 3" moves up.
Attachments
Relative positioning.nlbl
(3.51 KiB) Downloaded 12 times
Saso Fleiser
Senior Technical Product Specialist

outlawbl
Newcomer
Posts: 2
Joined: Wed Jul 08, 2020 10:08 am

Re: Append text if variable <> ""

Post by outlawbl » Wed Jul 08, 2020 1:25 pm

Thats it. You saved my time, thank you.

Post Reply