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 / Merge Two Collection o...
Power Apps
Answered

Merge Two Collection of Two different Gallery

(0) ShareShare
ReportReport
Posted on by

Hello there,

 

I have two different Gallery and I want to merge those two Gallery into one using Collection.

 

ie.

Gallery1

ID: 1 ;Name: "abc",

ID: 2 ;Name: "abc",

ID: 3 ;Name: "abc"

 

Gallery2

ID: 1 ;Name1: "abc",

ID: 2 ;Name1: "abc",

ID: 3 ;Name1: "abc"

 

Expectation:

ID  Name    Name1

1    abc       abc

2    abc       abc

3    abc       abc

 

Please let me know how to achieve this output.

 

Regards,

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,930 Most Valuable Professional on at

    Hi @manojrohit16 ,

    This blog of mine should assist you here.

     

    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

  • manojrohit16 Profile Picture
    on at

    Hello @WarrenBelz 

     

    Thank you for replying and sharing your blog to help me. 

  • manojrohit16 Profile Picture
    on at

    Hello @WarrenBelz ,

     

    Your blog helped me a lot and I was stuck in output like I merged two columns from one collection to another.

     

    Problem:
    I have an issue with date control. It saves only one date from the gallery not others.

    Can you please suggest to me why am I facing such an issue?

     

    Regards,

    Manoj Roy

     

  • WarrenBelz Profile Picture
    154,930 Most Valuable Professional on at

    Hi @manojrohit16 ,

    Not sure what you mean - the field type should not matter

  • manojrohit16 Profile Picture
    on at

    Thank you for your message.

     

    I was stuck to merge two collections into one and your blog helped to solve the issue but I use Date control in one Gallery and have an issue with date control. like only the first date of the gallery saved in db and others as blank.

     

    I tried to troubleshoot that issue but I don't get any issue there so just want to know is there any limitation with date control or is anything that I need to understand before I apply the code that you have doe in your blog.

     

    Regards,

    Manoj Roy

     

  • WarrenBelz Profile Picture
    154,930 Most Valuable Professional on at

    @manojrohit16 ,

    There is not restriction with Date fields - they should copy like any other field. I am assuming this field is in one of the collections (not just in the gallery)

  • manojrohit16 Profile Picture
    on at

    Hello @WarrenBelz ,

    Following are the Steps :

    Steps:

     

    1. I  created a collection of two galleries.(Gallery1,Gallery2)

    2. Save Merged Collections into another Gallery(Gallery3), I can see all the data perfectly in it.

    3. I patch the Gallery Data into Sql like Below:
    forall(Gallery3.AllItems,Patch(Db,Defaults(Db),{ field1: txtbox, etc.....}));

  • WarrenBelz Profile Picture
    154,930 Most Valuable Professional on at

    Hi @manojrohit16 ,

    You did not mention SQL as the data source - there is an issue with dates and this article may assist. 

  • manojrohit16 Profile Picture
    on at

    Hello @WarrenBelz ,

     

    Thank you for sharing the article, I read it and come to the point that it is having an issue with datetime type while I have only the date type in SQL. If I'm wrong to understand the article then please let me know.

     

    manojrohit16_0-1683358473391.png

     

    You can see that I can get the first row of date but the rest is blank.

     

    Regards,

    Manoj Roy

  • WarrenBelz Profile Picture
    154,930 Most Valuable Professional on at

    Hi @manojrohit16 ,

    I posted the article because I do not use SQL with Power Apps - I am a SharePoint only user, so am probably the wrong person to trouble-shoot this going forward, although your logic seems valid to me.

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard