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 / Filter a related table
Power Apps
Unanswered

Filter a related table

(0) ShareShare
ReportReport
Posted on by 19

I have two SQL 'one to many' linked tables.

Table 1 is "Teams."  The primary key is "ID", an integer.

Table 2 is "Members."  The one-to-many join field is "EntityID," also an integer.

 

I have a ComboBox that helps to look up a particular "Team." A FormViewer on the Screen shows various details for the "Team."  For testing, I have included a datacard (DataCard25) showing the "Team" ID.  

 

I want the Screen to show "Members" (in a table format) that are associated with the selected Team.

 

I have tried a couple of different approaches, using both a 'DataTable' and using a 'Gallery', to display the filtered data.  I've attempted a number of filtering formulas.  I receive notices that my formula is incorrect or delegation warnings...

                Filter('[dbo].[Members SubTable]', DataCardValue25.Text in Text(EntityID))    --Delegation

                Filter('[dbo].[Members SubTable]', DataCardValue25 = EntityID)                     --Delegation

                Filter('[dbo].[Members SubTable]', EntityID = DataCardValue25)                     --Invalid Argument

 

The only way I have been able to filter the table is to hard code the filter; i.e., 

               Filter('[dbo].[Members SubTable]', EntityID = 1731), where '1731' is an actual "ID" from the [dbo].

          [Teams] table.  (This works for both the datatable and gallary methods.)

 

Any insight would be greatly appreciated.

 

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Bubba I'm sorry to hear you're experiencing this issue. User @tchin-nin has a new blog post up with a deep dive into Delegation. I am going to include the link below. If this does not help please reply in this thread so I can find you a better solution. 

     

    https://powerusers.microsoft.com/t5/PowerApps-Community-Blog/Deep-Dive-Into-Delegation-What-Is-It-Exactly/ba-p/181456 

     

    @Anonymous

  • tchin-nin Profile Picture
    779 on at

    Hi @Bubba

     

    EntityID expects a number, and DataCardValue25 is a textbox. So using the Value(textbox.text) retrieves the number filled as text into the textbox.

     

    Can you try :

    Filter('[dbo].[Members SubTable]', EntityID = Value(DataCardValue25.Text))

     

    Also, you don't need to use a textbox containing the ID, you can directly use your 'Team reference' = what you're using in the Form.Item property.

     

    Théo

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard