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 / Join two records in a ...
Power Apps
Answered

Join two records in a collection

(0) ShareShare
ReportReport
Posted on by 565

Hi,

 

I have a dataverse table with some records and I need to create a collection based on the Name of the user and pulling away the values in the column "Data". 

So, for example, I have 2 records with these data and I want to create a collection like:

 

EmilioRoqueta69_1-1715684633056.png

Is there any way to achieve this result?

Thanks for any help!

 

Categories:
  • VishalJhaveri Profile Picture
    1,169 Moderator on at

    Find the method to joining 2 collections.

    Joining Collection - Power Platform Community (microsoft.com)

    Solved: Join two collections - Power Platform Community (microsoft.com)

     

    If my answer helps you please mark it as solution.

  • WarrenBelz Profile Picture
    156,958 Most Valuable Professional on at

    Hi @EmilioRoqueta69 ,

    Try this

    ClearCollect(
     MyCollection,
     RenameColumns(
     DropColumns(
     Ungroup(
     AddColumns(
     'Employee Table',
     Data1,
     Split(
     Data,
     ","
     )
     ),
     Data1
     ),
     Data
     ),
     Value,
     Data
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Verified answer
    Rajarsi Profile Picture
    13 on at

    Use the below code i think it will work. i have use a demo data u can replace with that with your dataverse table. If works plz give a like and reply

    // Original data
    ClearCollect(
     OriginalData,
     {
     Name: "Homero",
     Data: "Value1,Value2,Value3,Value5",
     Status: "Pending"
     },
     {
     Name: "Homero",
     Data: "Value7,Value8,Value10",
     Status: "Approved"
     }
    );
    // New collection
    Clear(NewCollection);
    ForAll(
     OriginalData,
     With(
     {
     Values: Split(
     ThisRecord.Date,
     ","
     ),
     master: ThisRecord
     },
     ForAll(
     Values,
     Collect(
     NewCollection,
     {
     Name: master.Name,
     Data: ThisRecord.Value,
     Status: master.Status
     }
     )
     )
     )
    );

     

  • EmilioRoqueta69 Profile Picture
    565 on at

    Thanks Warren, with your formula the column Status is missing in the collection. 🙏

  • EmilioRoqueta69 Profile Picture
    565 on at

    Thank you Rajarsi! It works great.

  • WarrenBelz Profile Picture
    156,958 Most Valuable Professional on at

    Hi @EmilioRoqueta69 ,

    I can assure you it is not missing - if it is in your Employees Table, then it has to be in the collection (I have not removed it). Below is the result of the code I posted - I have used code with a "one pass" structure rather than looping through the values.

    WarrenBelz_0-1715720702448.png

    This is the test collection I used to run the code on.

    ClearCollect(
     colTest,
     Table(
     {
     Name: "Homero",
     Data: "Valuel,Value2,Value3,Value5",
     Status: "Pending"
     },
     {
     Name: "Homero",
     Data: "Value7,Value8,Valuel0",
     Status: "Approved"
     }
     )
    );

     

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 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard