Replies: 9 comments
-
Hi @KYLumber, You seem to have the proper syntax and setup. I will try to replicate on my side. Norm |
Beta Was this translation helpful? Give feedback.
-
I think I found the problem: _bcr searches for an exact match in a dropdown (but not case sensitive). You can generate QR codes here: https://qr.io/ Or here in my KTL Tutorials app, in this demo page: https://ctrnd.knack.com/ktl-tutorials#ktl-demo-page/store-selector/barcodes-store-details/63c6ba90b076ad0011e73758/ So, as it is now, if only a partial match is found, it will show "not found". To address your use case, I guess the ideal solution would be to add a parameter that defines the behavior:
There matchMode could be: exact, partial or select
Does that make sense? Anything else to add? Norm |
Beta Was this translation helpful? Give feedback.
-
About this problem you mentioned: "Secondary problem, and may be related to the scanner, is that the results shown in this error message vary. Sometimes it is the whole number, sometimes the front half, sometimes the second half." I suspect it may be due to some latency with your Bluetooth scanner, or something else that's specific to that model. I always use wired USB readers and never had any issues with all the 60+ systems I've setup so far. But the good news is that I've provided two parameters to help solve such issues. See here: The Barcode Timeout value can be raised a bit to see if it helps. By trial and error, I've determined that 20ms is usually more than enough for all my use cases. But try raising this to 100 or more to see what happens. Then back down until you find the sweet spot. This timeout value tells the KTL to wait up to 20ms without any incoming characters before it starts the decoding process. The other parameter is useful to prevent decoding if less than N characters. This kind of discrimination can be useful in some situations. ND |
Beta Was this translation helpful? Give feedback.
-
I've added the new code to support the 3 new match modes for _bcr. In your case, you want to use the partial option. It will find and auto-select the first found string that contains what you scanned.
If you prefer to have the option to view and manually select among the results that have been found, use this instead:
Please try the Beta code please. Norm |
Beta Was this translation helpful? Give feedback.
-
Norm, |
Beta Was this translation helpful? Give feedback.
-
I made the KTL code to work with most readers as they are, "out-of-the-box". Default settings are a must for me. I have no time to fool around with custom suffixes, tabs and return characters! The client must be able to buy a new one, any make or model, and plug it in... period. So, if you can do that, try resetting the reader to its factory defaults before anything else, so we go back to square one. Usually, the manufacturer provides a barcode for that. Norm |
Beta Was this translation helpful? Give feedback.
-
Norm, Testing within our test app has been successful using the KTL beta with the additional [match, partial] group added. Thank you for the rapid testing and deployment of a fix. Excited about incorporating more and utilizing barcodes within our app. |
Beta Was this translation helpful? Give feedback.
-
Confirmation of the issue you discussed in matching exactly. Within this connection field I have a text formula set to display information that is user friendly and assists with making a selection. Given that the drop down typically filters on a search as typed response, this has functioned as intended. However, the barcode was only passing the unique ID of the SKU and, as you discovered, not returning a exact match. I mention this point as a separate comment in this discussion since it is common in Knack apps to use a text formula field as the display for connections. Something I had not considered in the transition to barcodes and complexity that it may cause. |
Beta Was this translation helpful? Give feedback.
-
Glad everything is now working as expected. That little change will be useful to others eventually, I'm sure. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks for the detailed documentation, Norm (@cortexrd)!
I am attempting to implement the _bcr tool and having some issues producing intended results. I have a test environment with a add form, the form only has one field which is a drop down connection field with only single selection possible. I am using CODE128 and a Bluetooth barcode reader. The reader is producing the expected results when tested in blank text fields or notepad.
The field name is "Retail_SKU" and the barcode has only the information that needs to be searched in the dropdown, no need to change the data before passing into the search field. Based on this the keyword _bcr=Retail_SKU was placed into the view description. Screen shot of the form from the builder. KTL Version is 0.27.9

The above entry appears to attempt a search but an error message pops up "Could not find ######" with # representing whatever the scan tool picked up. Secondary problem, and may be related to the scanner, is that the results shown in this error message vary. Sometimes it is the whole number, sometimes the front half, sometimes the second half. In this example only the first couple of numbers are captured but other scans produced the full number. Screenshot attached below:

If the exact same information that is shown in the error message is typed manually into the field the search processes as expected.

I have been over the information in the Wiki and reviewed your demo page, this should function as expected. What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions