cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver II
Resolver II

Parent Child Collections

Is it possible to create two collections whereby there is a parent child relationship, the data needs to loaded into the app as live connection cannot always be guaranteed.

 

So I have collection of parent (colParentItems) items already filtered on load to be valid, what I want is an additional collection of all child (colChildItems) items from SharePoint where the child parent.id is in the colParentItems.

 

Sounds like a simple query, but it's beating me.. Tried following..

ForAll(colParentItems, Collect(colChildItems, Filter(SharePointList, Parent.Id = colParentItems[@ID])))

and

Filter(SharePointList, Parent.Id in colParentIems[@ID])

but neither is working for me, so am stumped..

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver II
Resolver II

Re: Parent Child Collections

@MrNappa,

Many thanks for coming back with a suggestion..

I tweaked mine again back to this and it seems to get all the items I want..  whereas previously it was only returning afew items..

 

ForAll(colParentItems,Collect(colChildItems,Filter(SharePointList,Parent.Id=colParentItems[@ID])));

View solution in original post

2 REPLIES 2
Highlighted
Advocate IV
Advocate IV

Re: Parent Child Collections

I'm not certain, but the top solution might not be working correctly because the inner filter is meddling with the scope of your collections/data sources.

 

You could try:

ForAll(colParentItems, Collect(colChildItems, Filter([@SharePointList], Parent.Id = ID)))

Documentation about scoping.

Highlighted
Resolver II
Resolver II

Re: Parent Child Collections

@MrNappa,

Many thanks for coming back with a suggestion..

I tweaked mine again back to this and it seems to get all the items I want..  whereas previously it was only returning afew items..

 

ForAll(colParentItems,Collect(colChildItems,Filter(SharePointList,Parent.Id=colParentItems[@ID])));

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Come join us today! Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,669)