Hi
Ive built a stock ordering app which sends data to a sharepoint list. This works fine, but im trying to improve it. At present the data that is sent to the list is not grouped, so the products (even the same items) are listed as they are inputted, individually. I would like this information to come from the app to the list grouped. I can group the products in the gallery. I can group in a new collection with the use of a button. I cant get the grouped data to the list without losing all the other information.
How do i get the grouped data and the other information i need into the list? Im at my knowledge limit now!
My list has the following columns;
Title (product name), Category, Quantity, Area, Unit, OrderedBy, Date, OrderNumber, and Time.
To add a product to the gallery/collection - called colProduct
Collect(colProduct, {Title: ThisItem.Title, Quantity:TextQty.Text, Category:ThisItem.Category,OrderedBy: txtOrderedBy1.Text, Date: DatePicker1.SelectedDate, Time:Label22.Text, OrderNumber: RandomNumber.Text, Area: Label27.Text, Unit: Label11.Text})
The original text to patch is;
Set(varRecordOrder,ForAll(coProduct,Patch('Main Cellar Orders', Defaults('Main Cellar Orders'), {Product: Title, Quantity: Quantity, Unit: Unit, Area: Area, OrderedBy:OrderedBy, Date: Date, Time: Time, OrderNumber:OrderNumber})
Using a button for a new collection, im using this;
ClearCollect(colFinalSum,AddColumns(GroupBy(colProduct,Title,DATA),Sum,Sum(DATA,Quantity)))
Thanks
Gail