web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Dynamic gallery based on selected country and tables (multiple tables per country)

(0) ShareShare
ReportReport
Posted on by 2

Hi everyone,

I have a problem with a client request. I need to build an app that allows users to manipulate data — add, edit, and delete records from different tables.

Here’s the setup:

  • There’s a list of countries.
  • Each country has its own list of related tables (and new tables or countries will be added over time).
The process works like this:

 

  • The user selects a country from a dropdown.
  • Based on that selection, another dropdown is populated with the tables assigned to that country.
  • When the user selects a specific table, a gallery should dynamically update — both the number of columns and the displayed records should change depending on the selected table.
  • The user selects a country from a dropdown.

 

 

 

 

The issue I’m facing is how to make the gallery fully dynamic, so it adjusts automatically to the selected table’s structure (different columns, fields, etc.).

Has anyone dealt with a similar scenario or knows a good approach to make this flexible and maintainable in Power Apps?

 

Thanks in advance!

I have the same question (0)
  • WarrenBelz Profile Picture
    151,271 Most Valuable Professional on at
    Dynamic gallery based on selected country and tables (multiple tables per country)
    The fundamental issue you will encounter is that you cannot have dynamic data sources in Power Apps. Every query you make needs to be validated at the point you write/design it, so power apps knows that any reference to the potential output will be valid. It cannot do this if it does not know explicitly the data source it will deal with in the query.
    A better idea would be to have one list for all countries, with the country name as a field - you could then easily query the relevant fields based on a Filter on the Country field.
    Theoretically you can make a gallery a bit dynamic by hiding/showing fields base on a chosen criteria, but you cannot (for the reasons above) make the Items of the gallery conditionally based on multiple data sources, particularly if they have different structures.
     
    Please Does this answer your question 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 answering Yes to Was this reply helpful?
    Visit my blog
    Practical Power Apps    LinkedIn  
  • CU22100851-0 Profile Picture
    2 on at
    Dynamic gallery based on selected country and tables (multiple tables per country)
    thanks for response! 
    Would it be possible to create custom gallery/editable dynamic table in visual studio as PCF control?
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 829 Most Valuable Professional

#2
developerAJ Profile Picture

developerAJ 570

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 403 Super User 2025 Season 2

Last 30 days Overall leaderboard