@WarrenBelz
Wow, Thank you! You taught me a lot.
I'm not able to replicate your solution because my code is a little bit more complicated than I originally explained, but now learned the "With" and "UpdateContext" functions.
The second barcode can be successfully scanned as well.
I'd like to hear your thought on what I have so far.
I placed a toggle on/off statement when an item is scanned. (Hidden to the user)
If it is off, then it scans 1 line barcodes
How my app works with products with 1 line of barcode (contains all of the information, item code, lot number, expiry date in 1 line)
Step 1: Scan the item
Step 2: Item code portion of the barcode is matched against the item code database, and if it exists, I have a collect function and dissects the barcode information. If not, then error pops up
Step 3: The dissected information is placed in the gallery for the user.
*This part works well
For the products with 2 line of barcode. (1st line is item code, 2nd line is lot number and expiry date)
Step 1: Scan the first barcode (Item code)
Step 2: Item code is checked against the item code database & checks if the length of the 1st barcode is 16 digits. If it is true, then sets toggle to true and is ready to scan the second barcode, if not then error pop up.
*This makes it so the first barcode is always scanned first
" Len(BarcodeScanner1.Value)=(16),
UpdateContext({Scan1: BarcodeScanner1.Value}) & Set(settoggle,true), "
** I don't know if it's UpdateContext or Set to hold values
Step 3: Now the toggle is set to true, Scan the 2nd line of barcode, and just to be safe, checks if its not an item code. If it is not an item code, then it concatenates the Scan1 & 2nd Barcode value, if not then error popup
Concatenate(Scan1,BarcodeScanner1.Value) ; Set(settoggle,false)
Step 4: Dissect the combined barcode value and collect it line a single barcode.
I don't know how to incorporate the collect function to dissect the Concatenate, however as it's Scan1 does not show up because it's 1 big function.
Hope to hear your feedback!