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 / 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)
  • Michael E. Gernaey Profile Picture
    53,960 Moderator 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

  • BoboLee Profile Picture
    33 on at

    AddColumn will be a solution

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard