Hi everyone,
I have spent the last 3 hours trying to figure these 2 hurdles out , hope someone can help me out.
I'm developing a requisition business process app, using a gallery to load a products catalog from a sharepoint list. I have added a textinput field for users to input the quantity needed, with the ability to add and remove within each list item.
However, I have a use case where a user wants to enter the quantity needed for the items, and add them all at once, instead of adding each item one at a time.
1- what code should I be using to collect all quantities at once?
2- how do I disable users from adding a product unless a quantity box has been filled?
3- For some reason, I'm unable to reset the quantity field when clicking on reset all, is there something wrong with my code?
For reference, please see codes and gif below.
SearchBox
OnChange = Set(searchQuery,SearchBox_1.Text)
GalleryDryItem
Items = Filter(Search(DryItems,searchQuery,"Product"),CLI.Value="Dryfood Items")
Add Button
OnSelect = If(IsBlank(LookUp(FINALorderlist,ID=ThisItem.ID,ID)),Collect(FINALorderlist,{ID:GalleryDryItem.Selected.ID, ProductName:GalleryDryItem.Selected.ProductName, Quantity:GalleryDryItem.Selected.QuantityBoxDryitems.Text, UOM:ThisItem.UoM}))
Visible = !IsBlank(LookUp(FINALorderlist,ID=ThisItem.ID,ID))
DisplayMode (Error, this isn't working)
DisplayMode = If(IsBlank(ThisItem.QuantityBoxDryitems.Text),DisplayMode.Disabled,DisplayMode.Edit)
Remove Button
OnSelect = RemoveIf(FINALorderlist,ID=ThisItem.ID);Reset(QuantityBoxDryitems)
Visible = !IsBlank(LookUp(FINALorderlist,ID=ThisItem.ID,ID))

I would be very grateful for the help. Thanks.
<<<Edit>>>
Solution for point 3 can be found here, thanks go to @RandyHayes for that.
https://powerusers.microsoft.com/t5/Building-Power-Apps/Filter-and-collect-SPList-with-a-custom-textinput-number/m-p/698013/highlight/false#M223391