dynamic variables idea?

Software technical issues not related to any of the other categories

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
Posts: 1
Joined: Sat Sep 05, 2020 2:54 pm

dynamic variables idea?

Post by HenryAiden » Sat Sep 05, 2020 2:59 pm

Hi, With automation server I'd like to dynamically do variable matching from a label so I don't need to create a trigger for every label/variable. I currently use a SQL database trigger. I'm wondering about doing the following...
1. Database trigger will return one big XML variable with name / value pairs from SQL
2. Open Label Action
3. Get Label Information Action
4. Execute Script to attempt to pull the variables/data out of my SQL XML and attempt to match them to the correct XML returned from the Get Label information.

Do you think this will work? Or is there an easier way to do this?
Any advice/sample code would be appreciated.

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

Re: dynamic variables idea?

Post by Mytch » Wed Sep 09, 2020 6:44 pm


Which version and edition of NiceLabel Automation are you using (File > About)? For example, NiceLabel 2019 Automation Easy.

You can use a Database Trigger alongside an XML Filter (with Automation Pro or higher). Database trigger can receive your database field, parse it with the XML filter, and assign each available element to a variable. Those variable values are passed to the label for printing. So actions would be like:
1. For Each Record (receive database fields)
2. Use Data Filter (parse XML)
3. Open Label/Set Printer
4. Print Label

Please let me know if you need some more details or sample. Unfortunately, I don't have any advice to accomplish this with Automation Easy.


Post Reply