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 / Filter table or use a ...
Power Apps
Unanswered

Filter table or use a view?

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

I currently have a working PowerApp that can read and write to a single SQL Server table. It works fine, but the issue I'm having is that the table has 500,000+ records, and I only need a subset of those records (approx 200 at any one time based on a column value - ie. Status = 'Open').

 

A few questions below:

 

  • Is there a way within PowerApps to filter the SQL Server table to only retrieve the records I need? My understanding of PowerApps is it will pull any available records from the table up to the data limit (set to 2000 in my case - ie. max setting), and then allow me to filter on the records it has pulled. But I believe that won't help me. Please correct me if my assumption is wrong.

  • I can create a view in SQL Server to filter out only the records I need and then connect that view to my PowerApp. But how would I then handle write-back to the underlying table? Is there a clean approach to accomplish this?

 

Thanks.

 

 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    Hi @Anonymous ,

    The 2,000 limit only applies to non-delegable queries - I have a blog on Delegation and although referring to SharePoint, the same principles apply except SQL has less limitations.

     

    Please click Accept as solution 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 giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Verified answer
    timl Profile Picture
    36,383 Super User 2025 Season 2 on at

    @Anonymous 

    >> My understanding of PowerApps is it will pull any available records from the table up to the data limit (set to 2000 in my case - ie. max setting)

    This is only true of non-delegable expressions. The formula beneath is delegable, meaning that Power Apps will retrieve all target records correctly.

    Filter(YourTable, Status="Open")

    In answer to your second question, if you were to create a SQL Server view, you would make sure to return the primary key value in your view.

     

    In a typical app, you would set the data source of a gallery control to the view. When a user selects a record from the gallery, you would retrieve the selected primary key value.

    On an edit form, you would set the data source to the underlying table. The important difference here is that you would then set the item property of the form to look up the selected record from the underlying table using the selected primary key value from the view. The formula for the item property would look like this.

    LookUp(YourTable, PKColumn=<PKValueFromGalleryControl>)

     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard