
Scanner (barcode), compare between two Table(fields)
Hi, I 'am trying to use the scanner to check-in and -out products from my inventory by scanning the serial number barcode on the products. So I have three tables: "Product" > Sub-table: "Serialnumbers", they are linked to a table : "Rental". On the table Rental I have a button with this code:
let code := barcodeScan();
let serialnb := concat(Product.Serialnumbers.'Serial number');
let serialchk := contains(seriecnb, code);
if serialchk = true then
'copytohere' := code;
else
void
The problem is that if the serial number is: 123456 and the scanner has 1234 it will still check it as good.
My question is which code I should use for "exactly match" of the fields?
Thanks
-
I see what you're saying. Does concat(Product.Serialnumbers.'Serial number') create a string with all of the Serial Numbers? Maybe another possibility would be...
if (select Serialnumbers)['Serial number' = code] then
copytohere := code
end
I am unable to test this, but the idea is to test for a match using select and filter. I'm about to call it a night so I won't be able to respond until the morning here.
-
Hello,
I would need some help with this. I have a table STORAGE CLIENTS and every record has it“s own barcode/unique serial number.
I need, once our clients come back with their printed recepits, to scan the barcode and change the status of the record from IN STORAGE to CHECKED-OUT. I tryed playing around with the previous example but didnt have any luck. Can someone help?
What i did try is to create a new table with a button (as descrbed above) but can”t really get it to work. I need the system to simply change the status of the corresponding record once the barcode is read.
Thanks for any help!
-
if the status of your table is a text field it should be something like:
let code := barcodeScan();
let serialchk := (select Serialnumbers)[“Serial number” = code];
if serialchk != “” then
“your status field” := text(“checked”);
endfor testing if your button is working anyway you could add:
else
“your status field” = 0; (or whatever you want to put there)