web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Grouped Items

(0) ShareShare
ReportReport
Posted on by 30
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
Categories:
I have the same question (0)
  • mkloch Profile Picture
    7 on at
    Try making a grouped collection first, then Patch the collection to the SharePoint List.
     
     
  • wailey1 Profile Picture
    30 on at
    Thats what i have done with a button (the last bit of my question)  but because all the data, bar the Title, is in another table called DATA it doesnt like the patch code.  Im assuming i put in the Quantity column as Sum?
    Set(varRecordOrder,ForAll(colFinalSum,Patch('Main Cellar Orders', Defaults('Main Cellar Orders'), {Product: Title, Quantity: Sum, Unit: Unit, Area: Area, OrderedBy:OrderedBy, Date: Date, Time: Time, OrderNumber:OrderNumber}
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard