cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RossBroadley
Level: Powered On

Group collection items in sharepoint list under an identifier.

Hey guys.
I'm new to Powerapps and have been working on an app which is a digital version of an audit form, writing back to sharepoint list.
I'd like to be able to group items from my collection together, under something like "AuditID".  So that we can see which rows were created together through my app into sharepoint. Is this possible? And if so, which functions/formulas would be required to achieve this?
I've attached some code and a screenshot of the app so you can get an idea of what I'mn trying to achieve.

Code for adding items to the collection:
Collect(Inspections, {Response: Value(ResponseSlider_1.Value), InspectionDetails: DetailsData_1.Text, Question: QuestionDD_1.Selected})

Code for submitting collection to sharepoint:
ForAll(Inspections, Patch('Inspection Results', Defaults('Inspection Results'), {Response: Response, InspectionDetails: InspectionDetails, Question:Question}) )

Thanks alot!
Ross

1 ACCEPTED SOLUTION

Accepted Solutions
RossBroadley
Level: Powered On

Re: Group collection items in sharepoint list under an identifier.

Hi,
Thanks for getting back to me. That sounds like what I'm looking for. An individual AuditID per session (If they wanted to audit another location it would require a new session).

I will look into then information provided and give it a go.
Thanks again!

4 REPLIES 4

Re: Group collection items in sharepoint list under an identifier.

Do you mean that you want to group Audits created during one "session" of using the PowerApp? From when you start it and until you quit? And when you start it the next time you will have a new AuditID?

Re: Group collection items in sharepoint list under an identifier.

If the answer to the above question is yes then i would create a column in the SharePoint list called AuditID.

 

Then, when you submit the collection to the SharePoint list, start with finding the highest AuditID, add one to it and then add the variable to the Patch part.

 

Here are some information on how to find the highest value in a SharePoint-list.

 

https://powerusers.microsoft.com/t5/General-Discussion/Calculate-a-record-number-based-on-last-recor...

 

 

RossBroadley
Level: Powered On

Re: Group collection items in sharepoint list under an identifier.

Hi,
Thanks for getting back to me. That sounds like what I'm looking for. An individual AuditID per session (If they wanted to audit another location it would require a new session).

I will look into then information provided and give it a go.
Thanks again!

Re: Group collection items in sharepoint list under an identifier.

Yes, cool. Let me know if it works for you!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 48 members 4,929 guests
Please welcome our newest community members: