Database variables: how to make fields required and only show required fields in print window?

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
lbykerk1
Newcomer
Posts: 5
Joined: Fri Mar 20, 2015 8:48 pm

Database variables: how to make fields required and only show required fields in print window?

Post by lbykerk1 » Mon Jul 15, 2019 8:11 pm

Hello All,
I'm using NiceLabel 6 and am fairly new to using a database and VBscript, but have gotten my label template almost perfect with help from this forum. I still have two issues, though:

1. My label prints either serial number or lot number (or both) depending on a "yes" or "no" answer in the corresponding database field, but I can't figure out how to also make the "yes" field required at print time. Our current, non-template labels have the "value is required" box checked so that operators cannot print the label without entering data in the field, and I'd like to have that same error-proofing on my template as well. If I make those fields required on my template, though, I get the warning even if the variable is not required for that part number, per the database. Is there a VBscript (or something) that will make the variables required if the database has "yes" in their column, but not if it's "no"?

2. This one seems weird to me, and I might be missing something simple: all the variables I've placed on the label are prompted for in the print window, regardless of whether they're needed on the label (per the database fields noted in #1). Is there a way to make it only prompt for the fields that are marked as "yes" in the database? Specifically, as in #1, if only the lot number is required, I'd rather it not also prompt for the serial number as it does now.

Thank you in advance for all your help!

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 461
Joined: Mon Aug 28, 2017 3:07 pm

Re: Database variables: how to make fields required and only show required fields in print window?

Post by Kyleodonnell » Tue Jul 16, 2019 1:36 pm

Lori,

In V6 you can go into the variable's properties and click on advanced in the lower left-hand corner then go to the validation tab
Prompt required.PNG
Prompt required.PNG (13.91 KiB) Viewed 413 times
You will see the value required option under the additional settings at the bottom of the window. Unfortunately, there is no way to "turn off" the prompting of variables as they have these settings
prompting values.PNG
prompting values.PNG (15.16 KiB) Viewed 413 times
You can choose to hide the variables if they are not needs using active x scripting. However, it is done much easier in NiceLabel 2019. We'd recommend upgrading

lbykerk1
Newcomer
Posts: 5
Joined: Fri Mar 20, 2015 8:48 pm

Re: Database variables: how to make fields required and only show required fields in print window?

Post by lbykerk1 » Wed Jul 17, 2019 4:33 pm

Thank you for the quick reply. I suspected that the "Value is Required" box was the only way, but I was hoping there was a way to make it required based on the database field instead. If I use the "Value is Required" box, it's required regardless of whether the database says we need it or not (our labels only need lot or serial number, never both, and I wanted the right one to be required at print time). Unfortunately, management has decided not to upgrade to v2019 yet, so I need to keep working with v6. I'll add this to my list of reasons why we should upgrade, though, for the next time I make the proposal.

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 461
Joined: Mon Aug 28, 2017 3:07 pm

Re: Database variables: how to make fields required and only show required fields in print window?

Post by Kyleodonnell » Wed Jul 17, 2019 4:49 pm

Lori

To further clarify, there is not a way in the software natively to make a field required based on a database field. However, if you use our SDK (software development kit) that is a possibility as you can tap into the properties of the label and change things.

lbykerk1
Newcomer
Posts: 5
Joined: Fri Mar 20, 2015 8:48 pm

Re: Database variables: how to make fields required and only show required fields in print window?

Post by lbykerk1 » Wed Jul 17, 2019 6:42 pm

Is the SDK only available with the 2019 version, or can I use it with v6? If it's available for v6, could you give me more information on where to find it and how to use it? Thank you.

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 461
Joined: Mon Aug 28, 2017 3:07 pm

Re: Database variables: how to make fields required and only show required fields in print window?

Post by Kyleodonnell » Thu Jul 18, 2019 1:51 pm

Lori,

The SDK is no longer available as the software is end of life for support. The SDK is only available for NiceLabel 2019. However, the SDK is meant to be used by a developer and someone with intimate knowledge of C# programming.

Post Reply