Formula to keep an extra "0" from getting added when scanning in a UPC-A Barcode (12 digits).
I use UPC-A barcode numbers (12 digits) to enter supplies into my database and for searching as well (using an iPad/to scan them). Each time I scan a barcode from a product, it adds an extra "0" in front of the Barcode number -- as if it were reading it as an EAN-13 barcode number/13 digits instead of a UPC-A barcode).
---
What formula/code would I use to keep that extra digit from being added on - i.e. to force it to read the barcode number as a UPC-A barcode number (12 digits) and not an EAN-13 (13 digits) barcode number.
I've read thru other barcode related threads which mention button formulas and text fields, but I'm confused at this point as to exactly how I need to do this (a.) removing the extra digit "0" when I scan the barcode number/force it to read the barcode as UPC-A vs EAN-13, (b.) the correct formula, and (c.) where it should be placed/ and then in which field the barcode is to be scanned (e.g. if it's both a Button and a text field)
---
I've tried a few different things and have continued to check the Ninox forum for any new information ... and have also viewed Reference of Functions/Language ...
Perhaps I am being a bit 'dense' about this, but I'm just thorougly stuck -- so any help would be GREATLY appreciated!
THANK YOU!
Karen
7 replies
-
This worked for me...
Barcode := substr(Barcode, 1)
Barcode is the name of the Text field I used to capture the barcode (clever, right). I put that line in "On update" under "Advanced options" of the "Edit Field" screen. It just sets the field to the remainder of the characters after the first character. You won't notice the change until you have saved the record.
-
@Sean THANK YOU SO MUCH!! I will try it later on (as soon as I'm finished baking for the day :-) It makes sense ... I'm sure it's going to work. I really appreciate it! Have a great day! Karen
-
@Sean I couldn't resist and had to try ... I added a text field called Barcode ...in admin/I click on that field and the dialog/edit gives me: "MORE OPTIONS", then the options, e.g.Display field only, if ... and Trigger after update.
---
It doesn't go into Table options nor dBase wide options. What am I missing?? I'm using Ninox cloud ... but would be scanning the barcode via the iOS app / iPad. Is that where I'd need to add the code (iOS Ninox app)? Thanks so much again! Karen
-
@Karen, I did everything in the iOS app. Tap the hamburger menu to get to "Edit fields" and then the hamburger menu for the Barcode field.
-
@Sean, on my iPad I don't see the hamburger menu icon at all? I'm on the table where I added the text field barcode and .... ?
-
@Karen, Ok, I did everything on my phone. You put the code in "Trigger after update" in iPad app.
-
@Sean ah! Thank you Sean! I thought I was going crazy! Muttering to myself: "What 'hamburger'? Where hamburger??". Going to try it now ... :-) THANKS! :-) Karen
Content aside
- 5 yrs agoLast active
- 7Replies
- 2127Views