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 / PowerApps: Merge two c...
Power Apps
Answered

PowerApps: Merge two collections together and populate a gallery with the merged collection

(0) ShareShare
ReportReport
Posted on by

Hello,

I have two collections in the screen OnVisible.  They are:

ClearCollect(colKeyCombos1,Filter('Master Key Log',Branch.Value = gblOffice && Status.Value = "3 Approved" && Assigned_x0020_Keys < Key_x0020_Inventory && 'Key Type'.Value <> "Combination"));

ClearCollect(colKeyCombos2,Filter('Master Key Log',Branch.Value = gblOffice && Status.Value = "3 Approved" && 'Key Type'.Value = "Combination"));

 

They have exactly the same columns as they're coming from the same Data Source.  (Actually, I'd like to combine them into one ClearCollect but I keep getting an error when I try it, so I divided them into two.)

 

How do I merge them into a different collection, or add colKeyCombos2 to colKeyCombos1?

 

Thanks in advance for your help.

 

Categories:
I have the same question (0)
  • Verified answer
    SolTeferi Profile Picture
    on at

    Hi @Anonymous ,

    To create a new merged collection, you can use the following:

    ClearCollect(MergedCollection,colKeyCombos1,colKeyCombos2)

    Or, to append the second collection to the first, use the following:

    Collect(colKeyCombos1,colKeyCombos2)

    Hope that will do it.

  • Community Power Platform Member Profile Picture
    on at

    Thank you so much!  What I discovered was that if I changed the second one to just a Collect and used the same collection variable (colKeyCombos1), it accomplished what I was looking for.  

  • SolTeferi Profile Picture
    on at

    Awesome! That is a good trick too. Thanks!

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard