cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kosenurm
Super User
Super User

Gallery from more than one Dataverse table

Hi,

 

I am creating a deskbooking app, and have created a gallery screen to show the user's bookings. 

 

The Items code for this is currently "Filter(London Desks , 'London Desks Reserved For' = User().FullName && 'London Desk Reservation Date' >= Today())"

 

I want to add in their bookings for a different site in Cardiff (the table and columns are the same as the London one, but just replace London with Cardiff.. How can I nest it so that all their bookings >= Today appear for both sites?

 

Thanks


K.

1 ACCEPTED SOLUTION

Accepted Solutions

One gallery can only display one data source. So merging two data source into one is the only option. If you don't wanna use collection. Here's another idea. You can add two galleries one will show london another will show cardiff. Both will have exact same filters. This two galleries will be one above other. You can add a dropdown with two values. London and Cardiff.

Gallery that displaying london will have visible property like this:

DropDown1.Selected.Value= "London"

Gallery that displaying Cardiff will have visible property like this:

DropDown1.Selected.Value= "Cardiff"

 

This way data will be displayed based on dropdown selection.

 

View solution in original post

5 REPLIES 5
zmansuri
Super User
Super User

You can make a collection combining both tables.

For Eg. ClearCollect(colMain,RenameColumn(DB1,"London Desks" ,"City"),RenameColumn(DB2,"Cardif Desks ","City"))

 

This will create collection named colMain where you can change column name to same column name. Here i assumed London Desks  as column name. So, in the collection "City" column will have both the data from london and Cardiff. You can rename as many columns as you want to same name to merge their data. Then simply display your collection in gallery with same filters condition.

Thanks for the advice. How would I continue to filter to just that user's bookings and with a reserved date of >= today?

 

Thanks

K.

The Items code for this is currently "Filter(London Desks , 'London Desks Reserved For' = User().FullName && 'London Desk Reservation Date' >= Today())"

 

Isn't this code working? You are just changing datasource name. So instead of london desk it will be collection name. rest will be same

The current Items code is working to just bring back the London desks which that user has >= today. There are then two buttons alongside each gallery item (one to Edit, and one to Cancel). 

 

I'm getting a bit lost, as I thought it would a simple case of adding another datasource to the Filter code...

 

K.

One gallery can only display one data source. So merging two data source into one is the only option. If you don't wanna use collection. Here's another idea. You can add two galleries one will show london another will show cardiff. Both will have exact same filters. This two galleries will be one above other. You can add a dropdown with two values. London and Cardiff.

Gallery that displaying london will have visible property like this:

DropDown1.Selected.Value= "London"

Gallery that displaying Cardiff will have visible property like this:

DropDown1.Selected.Value= "Cardiff"

 

This way data will be displayed based on dropdown selection.

 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (4,793)