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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Trying to join data fr...
Power Apps
Answered

Trying to join data from two collections with no common ID

(0) ShareShare
ReportReport
Posted on by 4

Hi All

 

I have two collections with data.

 

Collection1 - list of student with their name and form

 

AlanMRichards_0-1682583083615.png

 

Collection2 -  has a list of objectives to be assessed against

AlanMRichards_1-1682583146398.png

 

For each student from Collection1 I want to create another collection with a line from Collection2. The end result being a line for every objective with the student details. So for Joe Bloggs they end up with a line for each objective with columns for their name and form and then again for the other students. For every student the new collection will have 1000 lines in the collection.

 

I know I could merge the two with Excel etc but there are other factors adding into the Collection 3 - such as the assessment which will be entered in the app in real-time. Collection3 would therefore be created in real-time as the student is selected and assessment is carried out.

 

I have tried all manner of If | ForAll | AddColumns but just can't seem to make it work. Maybe its impossible!

 

Hope that makes sense.

 

 

Categories:
  • Verified answer
    TikshaAggarwal Profile Picture
    on at

    Hi @AlanMRichards ,

    I have created the col1 and col2 two collections as you mentioned. And got the result in col3 which includes combination of data from both the collection without common Id.
    please find attached Screenshot

    TikshaAggarwal_0-1682590182222.png

     

     

    Clear(col1);Clear(col2);Clear(col3);
    
    ClearCollect(col1,Table({txtForm:"AB1",txtStudent:"JOe Blogs"},({txtForm:"AB2",txtStudent:"Nanct Free"})));
    
    ClearCollect(col2,Table({Sub:"ENG_RDG",Skill:"Word Reading",Obj:"Learning",CustomId:111},{Sub:"ENG_RDG",Skill:"Word Reading",Obj:"Learning",CustomId:112},{Sub:"ENG_RDG",Skill:"Word Reading",Obj:"Learning",CustomId:113},{Sub:"ENG_RDG",Skill:"Word Reading",Obj:"Reading",CustomId:114},{Sub:"ENG_RDG",Skill:"Word Reading",Obj:"Read words",CustomId:115},{Sub:"ENG_RDG",Skill:"Word Reading",Obj:"Coding",CustomId:116}));
    
    ForAll(col2,
     ForAll(col1, 
     Collect(col3, {Sub: Sub, Skill:Skill,Obj:Obj,CustomId:CustomId,txtStudent:txtStudent,txtForm:txtForm}) 
     )
    )

     

     

    Hope this helps.

    Please click Accept as solution if this helped you solve your issue. This will help others find it more readily. It also closes the item. Please consider giving it Thumbs Up.

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard