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 / Gallery from dynamic d...
Power Apps
Answered

Gallery from dynamic data source?

(0) ShareShare
ReportReport
Posted on by

Hello, I'm trying to build an app to search our part catalog.  There are 10 different categories of part, and each part category is kept in a different table because they each have different attributes that I need to search by.  Rather than building separate browse gallery and detail screens for each type of part, I'd like to have a single gallery that dynamically changes what table it's looking at depending on the part type that the user selects on the landing screen.

 

My solution so far:

 

To do this, I have a separate single column table called "part types" that is simply a list of all the part categories that populates the gallery on the landing screen.  Then I use the following formula in the OnSelect property:

 

Navigate(DynamicBrowseScreen_Example,ScreenTransition.None,{SelectedPartType: Switch(PartSelectGallery1_Example.Selected.'PartTypes (PartTypes)',"PartType1", Table1,"PartType2",Table2,"PartType3",Table3)})

 

Where I create a context variable SelectedPartType and set it equal to the data source table that matches the chosen part type. Then on the DynamicBrowseScreen, I have a Gallery that calls SelectedPartType in the Items property.  Everything works fine up to this point.  Clicking a part type on the first screen populates the gallery on the 2nd screen with data from the correct table.

 

The problem:

When I try to customize the gallery control for what info to show in the gallery view, it only seems to recognize the table columns that all the part tables have in common. 

 

For example, all the parts have a name and part number but some may have a diameter spec where others have a length spec.  When I try to enter ThisItem.(ColumnName) in the Text property on the gallery control, it only recognizes Part Number and Name, and will not recognize any of the columns that are unique to a single table.  This limits the type of information I can display and filter by for each part type.

 

Is there a solution that allows me to display different information and filter by different columns depending on the part selection?  

Categories:
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    Sorry, this is by design. Otherwise, part of codes will give an error when change to another table.

    You need to uniform the column construct of each table, add all required columns to each table, then you would be able to configure all columns in shared gallery.

    Hope this helps.

    Sik

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard