As the barcode is just a font representation of the actual ISBN it should be stored in the inventory record of the item it references.There is no need for a separate barcode table.
Use a global field to capture the initial scan. lets say gISBN. create a relationship between this field and the ISBN field in the inventory table.
After the scan have CNS barcode perform a script. something like this
If [ IsEmpty ( gISBN::Inventory_ISBN ) ] - check to see if there is an existing item - if not
Perform Script [ CreateNewRecord ] - this script can just simply change to the inventory layout, issue new record command and Set Field [ ISBN ; gISBN]
whatever you do when there is a match...
Pueblo System, Inc.
So I should creat a gISBN field in my Inventory table?
You could put it there.
If you are in the inventory table then you could just use Find instead of the global and a relationship. So to initiate the scan you would...
set error capture [ON]
Enter Find Mode
Goto Field [ ISBN ]
Pause - when the barcode is scanned you can continue the script
If ( Get ( FoundCount ) = 0 ]
not found create new record
display the found record.
My script looks like this:
Set Error Capture [On]
Enter Find Mode [Pause]
Go to Field [Inventory::ISBN_13]
Pause/Resume Script [Indefinitely]
If [Get (FoundCount) = 0]
Go to Layout ["iPhone (this)"]
This isn't taking me to the iPhone layout they way I stated it should. I also can't see the ISBN when the find is supposed to occur.
Also there are a number of things I want to do with the scritpt upon scan return. Not just this. E.g. I want to be able to start off in the iPhone layout, which I use for adding new records.
Thanks for your help so far.
It is hard to be specific with so little info about your system. Can you post a simplified version of the file or a better description of the tables etc…
Pueblo Systems, Inc.
Where is your perform find?
-- sent from my iPhone4 --
Doh! Still not working though.
My first question is what is the purpose of the iPhone table? It seems like a duplication of the Inventory table.
Long story. It's about time that I stopped using this duplicate table. Thanks for the idea. Anyway, Can you see what's wrong with my script?
Even still though. It's still not returning anything. It's not even putting the cursor in the correct field.
Is "not found create new record" an actual script step? I can't find it.
How should " display the found record" be written?