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 / PowerApps search and f...
Power Apps
Answered

PowerApps search and filter sql table

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

 

I have a problem with sql table and Power Apps gallery. I have SQL table with more than 5000 record but I only need to show data in powerapps gallery with filter which would probably will be only 100 records max but it only filter first 2000 record and display record which falls under 2000, so any idea how can I filter record which is more than 2000 and only show record filter record which only 100 or less.

below is the formula I am using so please any one can share any tips or any workaround.

 

Search(
Filter(
'[dbo].[Family_Violence_Listing]',
Listing_location = ddlViewCourtLocation.Selected.LocationID
&& DateValue(Text(Listing_Date),"en-US") = DateValue(Text(CalViewNTDate),"en-US")
),
TextSearchBox.Text,
"Case_Number",
"Party_Name"
)

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Anonymous 

     

    This is happening because of delegation, can you share a screenshot of the expression in the editor where it is showing blue line under the delegated part of expression.

    Also, can you try the below expression if this helps:

    Search(
    Filter(
    Filter('[dbo].[Family_Violence_Listing]',
    Listing_location = ddlViewCourtLocation.Selected.LocationID), DateValue(Text(Listing_Date),"en-US") = DateValue(Text(CalViewNTDate),"en-US")
    ),
    TextSearchBox.Text,
    "Case_Number",
    "Party_Name"
    )

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Community Power Platform Member Profile Picture
    on at

    Thank @yashag2255  for replying, I have tried to apple double filter as per your text below and still didn't work, I have remove the date filter and it brings all the record but with date sill =< 2000. 

     

    below is the screen shot. 

    thank you.


    screen shot.PNG

  • Verified answer
    v-monli-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    This is because that the date filter cannot be delegated when we use SQL as the data source. Please have a look at the workaround in below blog:

    https://medium.com/@dmitrii.korolev1/filtering-sql-table-by-date-in-powerapps-4711dc79696a

     

    Regards,

    Mona

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    Delegation works a bit different with the date records, can you try to do the workaround for setting up a variable to avoid delegation? This could be done on "OnVisible" property of the screen.

    Quoted from the article:
    Example #1 – The following filter throws a delegation warning:

    Filter(Jobs, ‘Tentative Job Start Date’ <= DateAdd(Today(),7, Days) )

    Issue: DateAdd is not a constant value. The filter depends on the value of this expression, but the expression is not delegable to the data source (not in the list of supported operations). As a result, the entire filter operation cannot be delegated.

    Solution: Evaluate the DateAdd expression separately and store the value in a variable (DateLimit) to be used in the Filter function. DateLimit is a constant value at the time of filtering. The filter no longer throws a delegation warning.

    Set(DateLimit, DateAdd(Today(),7, Days));

    Filter(Jobs, ‘Tentative Job Start Date’ <= DateLimit )

    Reference: https://www.powerobjects.com/blog/2019/03/04/delegation-warnings-powerapps/ 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Community Power Platform Member Profile Picture
    on at

    Thanks @yashag2255  and @v-monli-msft for you reply, really appreciate guys. 

  • Sairam_pera Profile Picture
    84 on at

    Is storedProcedure call in powerapps?

     

  • Community Power Platform Member Profile Picture
    on at

    Hi Sairam,

    You can call stored procedure via power automate in powerapps but you cannot directly call it in powerapps.

     

    Thanks.

  • Sairam_pera Profile Picture
    84 on at

    Thanks @Anonymous 

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard