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 a Collection an...
Power Apps
Unanswered

Adding a Collection and a SharePoint Datasource in a Gallery

(1) ShareShare
ReportReport
Posted on by 160

Hi guys! I have 2 different data sources, a collection and a SharePoint List. Is it possible to link a collection and a SharePoint List in a same gallery? Thanks!

Categories:
I have the same question (0)
  • BoboLee Profile Picture
    33 on at

    AddColumn will be a solution

  • Michael E. Gernaey Profile Picture
    53,690 Super User 2025 Season 2 on at

    Hi @Del-Dev 

     

    You would have to essentially join them together. If you have the same format between them?

     

    You would either set the Items property and join them there, or pre-join them together in like the OnVisible of the Screen etc.

     

    If they have the same format, then you can do 

    ClearCollect(MyCurrentCollection, SharePointList)

     

    now since usually a SharePoint list, unless its a custom view, has tons of ugg columns you dont want

     

    ForAll(SharePointList,
     Collect(MyCurrentCollection,
     {
     MyColumn: ThisRecord.SharePointColumn
     }
     )
    );

     

    Now if you dont want to add the SharePoint to your current Collection then do the following

     

    1. Do exactly as I have above in the code sample, but change the MyCurrentCollection, to MyNewCombinedCollection

     

    2. After thats Done, then as long as the New Collection matches exactly the existing one, then just do 

    ClearCollect(MyCombinedCollection, MyCurrentCollection);

     

    If it doesn't match then you have to do another ForAll to add them to the combined Collection


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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
Kalathiya Profile Picture

Kalathiya 403

#2
WarrenBelz Profile Picture

WarrenBelz 338 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 320 Super User 2025 Season 2

Last 30 days Overall leaderboard