Barcode Scanner Integration and Auto Click Submit

Hello everyone, I have a database system with various fields for an online store. The issue is that we are trying to implement invoicing via barcode scanners.

Right now I have a bluetooth barcode scanner with an iPad set up with the direct view knack system.

The fields are (Quantity) (Item) then a Submit Button.

In a perfect world I wish I didn’t have Quantity and have to manually submit every time I scan 1 barcode.

I know some scanners offer an enter suffix which at most populates the (Item) Field. Does anyone have workarounds or experience in scanning system similiar to a self checkout at a store?

Romel, do you have a Knack form setup for this? I’m not familiar with what the direct view knack system is. If it is a form, do you have two input fields; Quantity, Item and then a Submit button? Or, are you doing this another way?

1 Like

Hi romel

I would suggest looking at KTL.

@NormandDefayette_CortexRD is very responsive should you need help.

Craig

1 Like

Hi @ChristopherB,

Yes, Craig is right. The KTL handles this very well and can even do more. You can have a combination of pre-defined field data along with user input, and even auto-submit after a specific delay.

You can try a demo here: Knack

To see the QR code page, click on Home, enter the pre-defined log-in email and password and go to the Auto Fill and Submit QR Generator menu.

Let me know if that sounds interesting.
Norm

Yes, I do have a quantity and item field, the item field searches from a product data table

In regard to the other replies, unfortunately I don’t use QR Codes, I use regular barcodes and the scanner scans and inputs the SKU that matches in the item field by searching the product list I have.

Hi Romel,

What you want to do is pretty simple. I do this a lot with my current project.

It’s possible to have a barcode (typically Code128 automatic) that is generated by the KTL with a format that contains all you need (qty, SKU, price, etc).

Then, when this printed (or displayed) barcode is scanned while being in a Knack form, the KTL will split all values and auto-populate them in their respective fields. You can also set the system to wait a specific amount of time and auto-submit if you want.

Let me know if this is what you need to do.
Norm

1 Like

Thank you so much. I do have KTL on my app. Tbh the one I need most now is that with Stephen’s submit function, I would like for the same view to reload with the cursor back on the same field.

1 Like

Hi Romel

You could use a view renders and some JavaScript to do this. In the view render add this JavaScript:

$('#field_xyz').focus();

Craig

Norm has an autofocus function you could use:

1 Like

Hi Romel,

From what I see in the other thread with Stephen, you have a dropdown selector that needs to be searched. This becomes a two-step process where you must wait for the search outcome before submitting.

And what happens if the search fails? Should not submit for sure and pop up a timed error message.

This is why the KTL has been created: to address all possible use cases without any specific code.

I will see how I can do this with a new keyword: _bcr (Barcode Reader)

You’ll be able to specify the barcode format, and which field each portion should populate (called the mapping).

Example:

_bcr=[SKU, 10, 0, Price, 5, 2], [auto, submit, 2.5]

  1. Will extract the first 10 digits without decimals and search the SKU connected field
  2. will extract the next 5 digits and populate the Price field with a 3-digit value having 2 decimals.
  3. Once search in dropdown resumes successfully…
  4. Will wait 2.5 seconds
  5. Click Submit

How’s that?

Norm

1 Like

Hi @ChristopherB,

I’ve finished the barcode feature I mentioned above.

New keyword: _bcr

You can try it here: https://ctrnd.knack.com/ktl-tutorials#ktl-demo-page/barcodes/barcode-reading-automation/

Just scan one of the barcodes you see at the top, and the form will auto-populate, search the Lot number in the dropdown and if found, will submit the form after 2 seconds.

You can keep going on indefinitely, only requiring a pause due to the submit delay + 2 seconds from the keyword.

I’ve chosen a prefix with two colons :: followed by 3 fields.

Here’s what the Builder’s view looks like:

Hope you like it,
Norm

P.S. This is sneak peek of what will be in KTL v0.25.5

1 Like