cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Multiple tables in Gallery.item ?

Hello!

I'm pretty new to this so bear with me. Smiley Happy

 

Is it possible to have more than one table in the item property of a gallery?

 

I want something like this:

Gallery1.items=Table1 + Table2

 

Is this possible to do? I have searched this forum for answers, but I can’t find one. Please let me know if the question is too simply formulated or id you need more information to answer the question. 

 

Cheers!

//Joakim

  

 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

You could create a collection out of 2 tables and then assign the collectino to the Gallery. Note that this will not work if there's a slightest change in table schemas though.

Demo:

Assuming that you have Table1 and Table2, add 2 buttons and a gallery control.

Button1.OnSelect = Collect(zzz, Table1)

Button2.OnSelect = Collect(zzz, Table2)

Gallery.Items = zzz

Now click on both buttons.

I just tested this with 2 Excel tables. Hope this helps.

View solution in original post

4 REPLIES 4
Microsoft
Microsoft

You could create a collection out of 2 tables and then assign the collectino to the Gallery. Note that this will not work if there's a slightest change in table schemas though.

Demo:

Assuming that you have Table1 and Table2, add 2 buttons and a gallery control.

Button1.OnSelect = Collect(zzz, Table1)

Button2.OnSelect = Collect(zzz, Table2)

Gallery.Items = zzz

Now click on both buttons.

I just tested this with 2 Excel tables. Hope this helps.

View solution in original post

Community Support
Community Support

Hi @Anonymous,

 

Each Gallery could only be connected to one data source. Since you have 2 table which is 2 data sources for Gallery control, you could use the workaround that @dinusc has suggested. 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello,

An other approach can be this:

Button1.OnSelect = ClearCollect(Collection1,{text:"A"},{text:"B"});ClearCollect(Collection2,{ID:3,text:"C"},{ID:4,text:"D"})
Gallery1.Items = Ungroup(Table({column1:Collection1},{column1:Collection2}),"column1")

Collection1 and Collection2 are the tables you want to display in the same gallery.
This way you don't duplicate your data to a third collection.

Anonymous
Not applicable

This solutiong works great for me. Thank you for taking the time to help me.

 

Have a nice day!

 

Cheers,

Joakim

 

 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,159)