Hi, I'm trying to get my scan property to add to the quantity of the scanned item if it is scanned multiple times, instead of adding more entries.
I have a basic app (has to be simple) where users can scan products to perform an inventory count (its only purpose) The scanned records are stored in a collection with other data like date, user, location, quantity. But if the item is scanned again, it is added as another entry. How can it be done so that if the record has already been scanned, only the quantity is updated without it being added as new and if it has not been scanned, it is added as new?
The line of code is always and basic:
Set(Barcode1;First(BarcodeReader1.Barcodes).Value;;
Set(CurrentRecord;LookUp(colScannedItems;Barcode1=ScannedItem;ThisRecord));;
Collect(
colScannedItems;
{ScannedItem: First(BarcodeReader1.Barcodes).Value;Qty:"1";Location:"";ScannedTime: Now();Registered:User().FullName}
)