Hi Power Apps Community members,
I'm going in circles to achieve the following:
I have created a list of (inventory) items, with checkboxes. When user checks the items they want, they have the option to select the quantity. After setting the qty for each selected items, they can save them. It will be clear from the image

As you can see, the selection part is working.
What I'm trying to achieve is, although the users will see the item description, I want to take the item_id instead, in the collection and when the quantity is selected, the item_id and item_quantity will be saved as new records in a DB table (MS SQL)
The item_id, description & item_ref are in the same Inventory table
Most of the time, the users are not aware of item_id, unless a few common items.
OnCheck checkbox, I tried this:
Collect(CollectItems,ThisItem)
/*
Collect(CollectItems,
ItemDesc:ThisItem,
ItemCode: LoopUp(inventory,item_ref = Value(scannedValue2) || item_id = Value(TextSearch2.Text)).item_id,
// ItemQty: Dropdown1.Value,
) */
Please don't get confused by the item_ref, Its the item_id which is important.
I understand, I have to use a ForAll with a Patch function, but don't know exactly how to use the proper syntax!
I read many related articles but not able to find anything close.
Any advise, how I can insert all the records and Qty from the second Gallery (green box) when user click a Submit button, will be really helpful.
Thanks