Update preview after scan

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
highfrost
Valued Contributor
Posts: 27
Joined: Tue Aug 19, 2014 10:51 am

Update preview after scan

Post by highfrost » Tue Feb 04, 2020 12:29 pm

Hello,

I'm working on a simple form (Niceform 2019.2) for a secondary label check.
We do this check by scanning the barcode on the label and the form shows what other labels should have been used on the product (since we have over 2000 labels combination mistakes are made and thus we have a second person check these for all production lines).

This is all very easy and it works fine.
The one thing that bugs me is that I can't find a way to scan and have the form directly react to the input (so a field exit after the scan) and also select the input so I can directly scan again without any other user input than the new scan.

The direction I was thinking is with a move focus on change event.
However our scanners sends the characters 1 by 1 so I get 13 inputs and thus cannot use the on change event (unless I program the scanner to generate a specific end symbol and use that to set up as a condition on the move focus event, which sucks haha :) )

any good ideas to make this work?

PS The edit field i scan into has a variable source that i use in a SQL Where-statement to get the unique product record etcetc

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

Re: Update preview after scan

Post by Kyleodonnell » Tue Feb 04, 2020 3:02 pm

Highfrost,

You should use a variable event, instead of a on change event as the variable event will run after the whole value of whatever variable you are using changes.
Variable event.PNG
Variable event.PNG (29.56 KiB) Viewed 899 times

highfrost
Valued Contributor
Posts: 27
Joined: Tue Aug 19, 2014 10:51 am

Re: Update preview after scan

Post by highfrost » Tue Feb 04, 2020 3:29 pm

True, but then I would still need to exit the editfield after the scan to 'update' the variable.
This is what I am trying to prevent.
No interaction with the screen, just the scan input with a scanner
This is why I decided to go with the change on the editfield option.

highfrost
Valued Contributor
Posts: 27
Joined: Tue Aug 19, 2014 10:51 am

Re: Update preview after scan

Post by highfrost » Fri Feb 07, 2020 2:31 pm

Made a "dirty" work around for it.

Programmed the scanner so it sends a <tab> after the scan.
Made another editfield (hidden behind the actual input field) and have set this new field after the original input field in the tab order.
Last I set an on focus-event on the new field with move focus back to my original input field.

Might not be the cleanest, but it works :)

Post Reply