cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cpolito
Helper I
Helper I

Creating Nested Collection

I have a collection Collection_JC_Link that has  a job_id and  a contract_id column.  There can be multiple contracts per job.

 

I want to create a collection that lists distinct job_id and then a nested collection for each filled with contract_ids that are linked to them. 

 

This should be easy but i'm having writer's block. 

 

Thanks,

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@cpolito 

Firstly, they would not be "collections", you are referring to tables.

 

You are looking for a table that has a single column of job_id another columns with the related contracts.

 

If this is coming from one datasource, then the GroupBy function would provide this table for you.

 

If from multiple datasources, then ForAll (a table creating function) will provide a table like that.  Similarly, the AddColumns to the primary source would add columns with that additional table.

 

If the above doesn't jar the thought for you, can provide more details on your source(s) of data?

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

1 REPLY 1
RandyHayes
Super User
Super User

@cpolito 

Firstly, they would not be "collections", you are referring to tables.

 

You are looking for a table that has a single column of job_id another columns with the related contracts.

 

If this is coming from one datasource, then the GroupBy function would provide this table for you.

 

If from multiple datasources, then ForAll (a table creating function) will provide a table like that.  Similarly, the AddColumns to the primary source would add columns with that additional table.

 

If the above doesn't jar the thought for you, can provide more details on your source(s) of data?

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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