Updating Variable on Button Click

Label printing integration (NiceWatch middleware and ActiveX programming interface)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
Posts: 2
Joined: Mon May 10, 2021 3:11 pm

Updating Variable on Button Click

Post by ryan.cosgrove » Wed May 26, 2021 12:22 pm


I am new to Nice Labels, so I am still learning.... so please be patient ! :lol:

I have a variable setup (Max Days)which links to a database table, which brings through our Max days BB Date.
I then have another variable setup (Min Days) which also links to a database table, which brings tthrough our Minimun Days BB Date
I have a variable setup called "BB Date" and this value is initailly set linked to the "Max days" field, and the date pulls through to our preview label on the form. I then have 2 buttons configured on the form, one to set as Max Days and one to set as min days, and if they are clicked they are set to update the variable "BB Date". When I run the form, by clicking these buttons, it changes the BB Date field on the form no problem, but it does not update the date on the label preview... and when I print out it always has the max days value.

How do I get the updated date onto the label?

It is so strange as I have other combo boxs on the form which link to datase tables eg variety, and when I change these, it updates the preview instantly

Hope someone can help???



User avatar
NiceLabel Support
NiceLabel Support
Posts: 240
Joined: Fri Jul 13, 2018 10:26 pm
Location: Milwaukee, Wisconsin

Re: Updating Variable on Button Click

Post by Mytch » Wed Jun 02, 2021 11:44 pm


It would be helpful to know what version of NiceLabel you have installed and what Actions you are executing on the button that should be changing these values. Using something like "Set Variable" action should work just fine... unless there is something else on the label somehow controlling/overriding the output to some other value.

You can provide some more details here or just send us a Support ticket (if you are using NiceLabel 2017 or NiceLabel 2019):


Post Reply