Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 07 JUL 2000 03:32:19PM Tom Harkins wrote:

Data validation: unique values.

We are starting a project to barcode material here. How can

I ensure that a barcode number is entered only once into a

data file? Short of making the barcode number the record's

key, I can't recall where AREV (2.12) has any built-in

function for checking for unique values in a single-value

field.

Thanks

Tom Harkins


At 07 JUL 2000 04:52PM Dba wrote:

You are probable going to need a xref file also, therefore create another file for your validation.


At 08 JUL 2000 11:57PM Richard Hunt wrote:

Tom…

As far as i know AREV does not. You could easily use a few lines of code to produce the results you wish. Check this out…

Lets assume that the barcodes are stored in a variable called RECORD, and that field 2 is the barcode field in that variable. And also that the new barcode is stored in a variable called BARCODE.

LOCATE BARCODE IN RECORD USING @VM SETTING VALUE THEN

* the barcode exists and i would do this.

RECORD=BARCODE

END ELSE

* the barcode does not exist and i would do this.

RECORD=BARCODE

END

i have years of programming experience with barcodes. you would be better off using the barcode as the record's key. See that way you wont have to worry about the variable exceeding maximum length limitations.

also, i would store raw scans in a sequential file as the user scans each item. that way there are no computer delays between scans. and then after they are done scanning, you can convert the raw scans to real data.

when it comes to checking for unique barcodes. take the last time it was scanned. what i mean is this… if a barcode is scanned more than once, take the last time it was scanned as the scan to save.


At 11 JUL 2000 01:47AM Curt Putnam wrote:

If the barcode value is not useful as the record key, then consider:

a btree on the barcode value - check with btree.extract

Use a file that holds nothing but keys - used barcode values


At 17 JUL 2000 01:04PM Tom Harkins wrote:

Thanks for the input, folks. I decided to use the barcode as the

record key, since that's the simplest approach. I was thinking about using validation, but wanted to avoid the overhead of writing another file.

Tom

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/51eb0cda9527853285256915006b5464.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1