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 / A Collection of availa...
Power Apps
Unanswered

A Collection of available DataTables

(0) ShareShare
ReportReport
Posted on by 7

Hi,

Ive been searching for a while but i couldnt find any solution to my question, so ive decided to ask.

I currently have 3 tables in the application, is there a way i can get a list of available datatables? i want to make a button to switch between the datatables in my gallery. Right now its only 3 so i could manually put then all in a collection, but later it could be a variable amount of tables.

Categories:
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Rystel Could you clarify, Do you want to change databases or tables? Databases and tables are different. FYI: A database contains n number of tables.

     

  • Rystel Profile Picture
    7 on at

    Hi, sorry if i was unclear.

     

    Im currently building a "frontend" for an excel file. So im using the tables from excel as data sources

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Rystel Each excel Table would be a datasource in PowerApps. You cannot add them during runtime but they need to be added in the Studio during development. Once all datasources (excel tables) are added, you can switch around using If or Switch statements, E.g,

    Switch(tableName,

         "table1", Filter(table1,.........),

         "table2", Filter(table2,.........),

         "table3", Filter(table3,.........),

    )

  • Rystel Profile Picture
    7 on at

    So if i were to have something like 50 tables(as an exaggeration) in my app, i would need to manually assign each to a switch case? i would have to manually make a collection of each table?

    as example
    ClearCollect(Tables
    {Table:Table1,TableName:TableName1},
    {Table:Table2,TableName:TableName2},
    {Table:Table3,TableName:TableName3},
    ....
    {Table:Table50,TableName:TableName50})

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Rystel Unfortunately yes! there is no way to dynamically connect to datasources (excel tables in your case) from Power Apps. But 50 tables! Maybe there is a way to design and reduce that count 🤔???

  • Rystel Profile Picture
    7 on at

    Thanks for the answer!

     

    i used 50 as an exaggerated number to get my point across, its something closer to i think 20 or so. So annoying, but not too bad.

     

    Ill see what i can do to maybe reduce that number even further.

     

    Thanks again!

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Rystel Glad to help!

     

    Please remember to give a 👍 and accept the solution as it will help others in the future.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard