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 / Referencing a Table wi...
Power Apps
Answered

Referencing a Table with a Text value

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I have a table that I imported from excel, call it Table1. Table1 contains the names of other tables, also imported from excel.

 

On Screen1, I have Gallery1 displaying the data from Table1. 

 

On Screen2, I want to have Gallery2 displaying the data from the table whose name was selected from Gallery1.

 

What I have so far:

Gallery1 "Items" value: Table1

Gallery1 "OnSelected" value: Navigate(Screen2, ScreenTransition.Fade)

 

Gallery2 "Items" value: Gallery1.Selected.Column1

This throws an error because Gallery1's "Items" value expects a Table and not a Text value.

 

How do I reference the Table associated with the text value returned by Gallery1?

 

Thanks,

Jake

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    I assume the both Table1 and Table2 have a common Column
    On the OnSelect of the Icon inside the Gallery1 put:

    Navigate(Screen2);Set(varSelected, ThisItem.CommonColumn)

     

    Then Filter Gallery2 as:

    Filter(Table2, varSelected in CommonColumn)

    Or

    Filter(Tabel2,CommonColumn = varSelected )

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

     

    The tables don't have common columns. Table1 holds the names of the other tables that I want to reference.

     

    So, I want Gallery2 to fill its "Items" value with the table whose name was selected in Gallery1.

    The problem is, the Gallery "Items" value only takes a Table data type, so simply passing the Text value of the name of the table that I want to reference throws an error.

     

    Can I reference a Table with a Text value corresponding to its name?

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    You cannot reference objects in PowerApps like that.

     

    You will need to have a common data structure/signature for your Gallery2.

    Or, you will need to make a Gallery for each table you have and set its Visible property based on the selection in Gallery1

     

    If you are expecting to dynamically add table names to the first Gallery datasource and have PowerApps be able to display new ones without altering your App, you will not be able to do so.

     

    Sorry of this is bad news, but hopefully it will give you some direction.

     

    There are several ideas listed in the Idea Forum, including one I placed over a year ago) that you are welcome to go and vote on for this ability.

     

  • ObaedaBA86 Profile Picture
    17 on at

    Hello, 

     

    Is there any update or workaround on this issue ? 

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard