Saved Variables in Action Editor

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
DavePizza
Enthusiast
Posts: 8
Joined: Mon Jul 22, 2019 10:14 pm

Saved Variables in Action Editor

Post by DavePizza » Tue Jul 23, 2019 10:53 pm

Hello, first time NiceLabel user here.

I am trying to create an automation trigger for an updated .txt file (weight) that automatically prints a label when the file is changed/updated. So, in theory at least, when a weight is recorded on our scale and the .txt file is updated, a label will print.

However, I also have 2 value fields that require input from the user before printing. One field is a drop-down list of selections, the other is a string of characters that requires manual entry. I am getting an error message when testing the trigger, because both value fields require value in order to print a label.

So, in order to give these fields value, I am trying to use the "Save Variable" action in the NiceLabel Automation Builder. But the only choices I have are "Set Variable" and "String Manipulation". And without this feature, I am at a loss for what to do to fix my situation. Is it because I am using NiceLabel 2017, or am I doing something else wrong entirely?

Thank for your time and assistance.

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

Re: Saved Variables in Action Editor

Post by Mytch » Tue Jul 23, 2019 11:43 pm

DavePizza,

Thank you for your inquiry.

With a NiceLabel PowerForms Suite license (2017 or 2019), you have access to the PowerForms product level of Designer and Easy level of Automation. In this case, Designer will have the action for Load Variable Data, but Automation Builder will not. At least Automation Pro is required for this action, which is only available with LMS Pro or higher. We would recommend contacting our Sales team at sales.americas@nicelabel.com if you have any questions about upgrading.

In terms of using the current Automation Easy level, it may be possible to use two filters if you have two incoming data sources. For example, you can have one Use Data Filter action that has a Data Source of "Use data received by the trigger", as in the text file that Automation is monitoring. Then, a second Use Data Filter action can be used with a Data Source of "File name", which can be looking for the text file saved by your PowerForms Solution using the Save Variable Data action.

See below of a sample "action tree" from Automation Builder to accomplish this:
screenshot_15.jpg
screenshot_15.jpg (11.63 KiB) Viewed 545 times
Does this work for you?

Thanks,
Mytch

DavePizza
Enthusiast
Posts: 8
Joined: Mon Jul 22, 2019 10:14 pm

Re: Saved Variables in Action Editor

Post by DavePizza » Wed Jul 24, 2019 12:14 am

Thanks for your response Mytch.

I definitely I understand the logic behind the workaround. But I am struggling to even save a text file with PowerForms Solution (which would be used as a data source in the second Use Data Filter, as you suggested). I still see no "Save Variable Data action" in my PowerForms Solution ribbons.

Dave

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

Re: Saved Variables in Action Editor

Post by Kyleodonnell » Wed Jul 24, 2019 1:25 pm

Dave,

On your button, in the events tab on click, you can search for the save variable data action
Capture.PNG
Capture.PNG (16.39 KiB) Viewed 529 times
This action does come with powerforms. Please follow the attached video to add this action https://drive.google.com/file/d/13Qoh26 ... sp=sharing

DavePizza
Enthusiast
Posts: 8
Joined: Mon Jul 22, 2019 10:14 pm

Re: Saved Variables in Action Editor

Post by DavePizza » Wed Jul 24, 2019 8:45 pm

Thank you for the video Kyle, very helpful!

The variable workaround seems to be fine, I'm just having issues with value length in my GS1-128 barcode when I run an automation preview.
AutomationErrorGS1128.png
AutomationErrorGS1128.png (52.39 KiB) Viewed 521 times
Is there a way to edit the application identifier value length? Or maybe format the value field so the length is 6? I feel like there's an easy solution to this issue that I am overlooking.
ApplicationIdentfier-EditFunctionDefinition.png
ApplicationIdentfier-EditFunctionDefinition.png (37.32 KiB) Viewed 521 times


Thanks again for all of your time and assistance.

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

Re: Saved Variables in Action Editor

Post by Kyleodonnell » Wed Jul 24, 2019 10:01 pm

Dave,

The issue is with your variable type for weight, you have it set to a Floating-point which is a decimal point, all you need to do is change the data type to text and it will accept the decimal you are passing in.

DavePizza
Enthusiast
Posts: 8
Joined: Mon Jul 22, 2019 10:14 pm

Re: Saved Variables in Action Editor

Post by DavePizza » Thu Jul 25, 2019 9:09 pm

Kyle,

I can't seem to get it to work still. I changed the variable type from Floating Point to Text, but instead I get the error that no decimals are allowed, rather than an incorrect value length error like my post above.
GS1128 Weight Variable.png
GS1128 Weight Variable.png (51.69 KiB) Viewed 497 times
GS1128AutomationError.png
GS1128AutomationError.png (39.81 KiB) Viewed 497 times
I also realized that when trying to print, my GS1 data matrix hasn't been including the Weight variable that is connected to my .txt file connected via the Database wizard. I get a similar error about decimal characters and application identifier 320 when trying to print my solution. Something tells me this is the root of my issue with automation as well.
GS1128 Print Error.png
GS1128 Print Error.png (39.61 KiB) Viewed 497 times
Any thoughts or advice?

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

Re: Saved Variables in Action Editor

Post by Kyleodonnell » Thu Jul 25, 2019 10:09 pm

Dave

The 320 application identifier cannot accept decimal points in it at all, that is the reason why you are getting the error. You would need to trim out the decimal point in order for it to work. The 320 application identifier can only accept non-decimal point numbers as the error states. Please take a look at the enclosed sample
Attachments
DP.zip
(120.11 KiB) Downloaded 15 times

DavePizza
Enthusiast
Posts: 8
Joined: Mon Jul 22, 2019 10:14 pm

Re: Saved Variables in Action Editor

Post by DavePizza » Thu Jul 25, 2019 11:47 pm

Kyle,

We are hoping to keep two decimal places for a more precise log of Weight. Is there a way to format/trim our .txt data so the GS1-128 function can interpret it properly and place it in the data matrix? Ideally the printed text of Weight adjacent to the data matrix would retain its decimal point as well.

Maybe there is a different identifier besides 320 we could use instead?

Thanks,

Dave

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

Re: Saved Variables in Action Editor

Post by Kyleodonnell » Fri Jul 26, 2019 1:46 pm

Dave,

It would have to be a whole number and you would need to remove the decimal point. You may be able to use a different AI as we cannot change the standards for AI 320. Unfortunately, going through the AI's for weight, they all must accept whole numbers and cannot use decimal points.

You could use a VB script that will replace the decimal point with nothing and use that VB script as the weight for your AI
vb.PNG
vb.PNG (6.82 KiB) Viewed 481 times

Then you can still have the output text on the label to show the correct weight
vbfunction2.PNG
vbfunction2.PNG (64.93 KiB) Viewed 481 times
Please take a look at the attachment
Attachments
vbscript.zip
(6.13 KiB) Downloaded 10 times

DavePizza
Enthusiast
Posts: 8
Joined: Mon Jul 22, 2019 10:14 pm

Re: Saved Variables in Action Editor

Post by DavePizza » Fri Jul 26, 2019 8:48 pm

Kyle,

Thank you so much for all your help! All your advice has worked great. I almost have everything I need working now, but my Automation isn't printing my last text field (Weight) for some reason. Yet the value is updated/retained in the GS1 data matrix when I scan it. Any suggestions would be greatly appreciated.

Here is the Automation print preview (the Weight field is contained in the data matrix, just not in the adjacent text box):
TriggerPrintPreview.png
TriggerPrintPreview.png (20.26 KiB) Viewed 468 times
And the Designer print preview (my desired result):
DesignerPrintPreview.png
DesignerPrintPreview.png (19.2 KiB) Viewed 468 times
Thanks again,

Dave

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

Re: Saved Variables in Action Editor

Post by Kyleodonnell » Mon Jul 29, 2019 1:35 pm

Dave,

You as you are passing variables into the label. It is not recommended to try to have a database field also pull information, data should come from one source as it makes it easier to troubleshoot issues. In the sample I sent, I am using a variable called Scaleweight. The variable is being used in the VBScript to remove the decimal place when it is put into the barcode. As the variable is being used in the barcode, we recommend just placing that same variable on the label as well. As the sample we sent you does the same thing.

Post Reply