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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Adding data from a col...
Power Apps
Answered

Adding data from a column in a data table to a collection

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

Please see the attached image of the app. I have a data table that views the data when the user selects something on a power BI report. I want to get the data from the contact id column and the data from the text fields(subject,description) into a collection when the button is clicked. I have the following code in the button but it does not work. The contact id is not getting added to the collection.

 

Collect(
DVdetails,
{
Subject: I_Subject.Text,
Description: I_Description.Text,
MyContactID: ContactID_Column3.Text
}
)

 

I want the collection as:

 

ContactIDSubjectDescription
FF388...ddddd
FF413...ddddd

 

Please help. 

 

 

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    I resolved this using the following code. We can merge two collections together:


    ClearCollect(
    MySPCollection,
    PowerBIIntegration.Data
    );
    ClearCollect(
    DVdetails,
    {
    ID: 1,
    Subject: I_Subject.Text,
    Description: I_Description.Text
    }
    );
    ClearCollect(MergeSubject,
    AddColumns(MySPCollection, "Subject", LookUp(DVdetails,ID=1,Subject) )
    );

    ClearCollect(MergeDesc,
    AddColumns(MergeSubject, "Description", LookUp(DVdetails,ID=1,Description))
    )

     

  • v-monli-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    Thanks for sharing your resolution here and hope others could benefit from it.

     

    Regards,

    Mona

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard