Page 1 of 1

Update preview after scan

Posted: Tue Feb 04, 2020 12:29 pm
by highfrost
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

Re: Update preview after scan

Posted: Tue Feb 04, 2020 3:02 pm
by Kyleodonnell
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 898 times

Re: Update preview after scan

Posted: Tue Feb 04, 2020 3:29 pm
by highfrost
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.

Re: Update preview after scan

Posted: Fri Feb 07, 2020 2:31 pm
by highfrost
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 :)