Ignorning line feeds and/or carraige returns

I’m trying to simplify and speed up our process of starting tabs since 85% of our patrons pay by tab and nearly 100% of guests do as well.

We already have to check ID’s of everyone who is ordering so I thought I’d eliminate a step by scanning their ID and parsing it with the scripts Ive already written for my members system - That way we’re checking age, pulling their name, and adding that information to a ticket in one scan.

The problem I’m running into is that the 2D scanners we use are keyboard wedges and they send the /r /n ect to samba. Right now I’m tinkering with using an editor widget in a custom entity screen but wanted to see if anyone else has attempted this already? The editor widget seems to be the only input method that will allow the carraige returns to be captured.

Is there by chance a way to tell Samba to ignore those or accept raw data?

Happy New Year everyone!

This input from the 2D scanners is processed through a script or direct input into the POS?

Both I guess? The scanner is an Airtrack S2-BT. It’s set up as a keyboard wedge so the input is no different than if I were typing on the keyboard directly. So yes, it’s directly input into Samba and it would be parsed through an AAMVA script that breaks down the barcode on the back of any govt ID/DL. Here is an example of what is read by the scanner…

ANSI 636000100002DL00410278ZV03190008DLDAQT64235789LF
DCSSAMPLELF
DDENLF
DACMICHAELLF
DDFNLF
DADJOHNLF
DDGNLF
DCUJRLF
DCADLF
DCBKLF
DCDPHL
DBD06062019LF
DBB06061986LF
DBA12102024LF
DBC1LF
DAU068 inLF
DAYBROLF
DAG2300 WEST BROAD STREETLF
DAIRICHMONDLF
DAJVALF
DAK232690000 LF
DCF2424244747474786102204LF
DCGUSALF
DCK123456789LF
DDAFLF
DDB06062018LF
DDC06062020LF
DDD1CR
ZVZVA01CR

I have the script to parse the information out that I need already. I use that script in another process to pull this same information from an image of their DL when on-boarding. I would just use that process but it’s counterintuitive to have to scan the ID with a card scanner(flat bed) every time someone opens a tab.

Thanks in advance for your feedback. If it’s not possible it’s not possible. It would just save my people a lot of time.

Not familiar with Airtrack but several scanner manufacturers (Zebra, Honeywell, etc) allow programming through either software or actual programing barcodes to manipulate data including removing removing carriage returns or swapping them with another character or sequence for easier parsing. The scanner would still have the ability to send the carriage return at the end of the data to be the equivalent of hitting “enter” as if it was typed.

In JavaScript str.replace(/\r?\n/g, "") should remove CRLF

Thanks Memo. That was my goto but i don’t have a way to inject that before the data reaches Samba. Its sent to Samba straight from the Scanner so there isn’t anywhere to add scripting. :confused: I’m going to try staylorcarson’s suggestion. It’s a 300 scanner so I’m hoping i can do something similar to that. I know it can be programmed but this would be a first for me. :slight_smile:

Usually, you program the scanners are programmed by scanning a barcode in the manual. I did look briefly through the manual of your model, but did not find any terminology that recognized as a carriage return. It might have been in there, and I missed it. I did see a factory reset barcode, so rest assured if you mess the scanner up, you can always factory reset.

Yea - I looked as well and didn’t see anything that sounded like what staylorcarson mentioned but I’m going to reach out to the manufacturer and see if they have a potential solution.

On a positive note - I was able to get a proof of concept workflow to do what I need it to. It’s not the prettiest solution but it’ll work until I can work out the kinks.

If anyone else is interested I basically did what i mentioned earlier - I created a multi-line editor widgit that has focus on a custom entity screen. That way whenever you scan the id it automatically populates the editor, saves it to a program setting. I then take my existing parser (with a few minor adjustments) and parse birthday and name from the ID and save those to program settings as well. Then finally calculate the Age to be displayed with an Ask Question followed by the automation to start a new ticket with the name stored in the program setting.

The only thing I did but really don’t know how i did it was I got the editor widget and somehow accidentally hid it off-screen. It’s great for now but if i have to change anything with that particular widget I guess I’ll have to start fresh because I can’t seem to find the thing no matter what I do. :laughing:

I’ll add a little more detail with images soon if anyone else may be interested in implementing something similar. This is going to save my bartenders so much time pecking out names for tickets!

You do, you can strip it out of the value in Numberpad Value Entered Rule by using
replace(/\r?\n/g, '') on value of [:NumberpadValue] field