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

Get Max ID within Group from SharePoint List to PowerApps

Hi!

 

I'm creating a record in Power Apps and saving it to SharePoint List with Patch() function

 

My List has Parent_ID and Child_ID. The Max(Child_ID)+1 within group will be next Child_ID for new record.

 

How to get the Max of Child_Id within group in Power Apps, ex:- How to get Child ID 13 within Parent group 10?

 

Tried the Sort and First formulas, they are returning the Max ID across all groups which is not i wanted.

 

Parent IDChild ID
1011
1012
1013
2021
2022

 

I appreciate you help!

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
EricLott
Level 10

Re: Get Max ID within Group from SharePoint List to PowerApps

You can use the Max() function. Try this:

 

Max(YourFilteredData,ChildID)

For example:

Max(Filter(YourSharePointList,ParentID=1),ChildID)

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

 

View solution in original post

3 REPLIES 3
EricLott
Level 10

Re: Get Max ID within Group from SharePoint List to PowerApps

You can use the Max() function. Try this:

 

Max(YourFilteredData,ChildID)

For example:

Max(Filter(YourSharePointList,ParentID=1),ChildID)

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

 

View solution in original post

Super User
Super User

Re: Get Max ID within Group from SharePoint List to PowerApps

@Sitara
Try this:
Max(Filter(your_datasource_name, ‘Parent ID’=10), ‘Child ID’)

—-
Please Accept As Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
Sitara
Level: Powered On

Re: Get Max ID within Group from SharePoint List to PowerApps

Thank you so much

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,944)