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 / Sharepoint delegation ...
Power Apps
Answered

Sharepoint delegation problem

(0) ShareShare
ReportReport
Posted on by 86

Hi folks,

 

I created an app with a Sharepoint List as DataSource. This list has 3356 records. To query the records there is a text field to search for the student email and a dropdown list to filter based of the degree. The problem comes out when trying to access records wich are up to 500. I know there is an option to increase this limit to 2000 but this solution does not apply for this. I'm using the next formula in my gallery:

 

SortByColumns(
 Filter(
 If(
 ddStatusFilters.SelectedText.Value <> "Show All";
 Filter(
 Cuentas;
 ddStatusFilters.SelectedText.Value = Tipo_cuenta.Value
 );
 Cuentas
 );
 StartsWith(
 EmailO365;
 TextSearchBox1.Text
 )
 );
 "EmailO365";
 If(
 SortDescending1;
 Descending;
 Ascending
 )
)

If I try to pull the record 3344 whic corresponds to emilio.whitfeldla@domain.com it returns nothing.

 

delegation1.png

 

If I change the formula to the following it returns perfectly the 3344 record but I loose the capability to filter based of the dropdown value:

 

SortByColumns(
 Filter(
 Cuentas;
 StartsWith(
 EmailO365;
 TextSearchBox1.Text
 )
 );
 "EmailO365";
 If(
 SortDescending1;
 Descending;
 Ascending
 )
)

delegation2.png

 In addition to the above I created an index in the sharepoint list for the email column but there was no success. What am I doing wrong?

 

Could you help me with the right sintax to query these records without loosing the filter of the dropdown value please.

 

Regards,

Categories:
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Are you actually getting the delegation warning and if so, where does blue squiggly line appear when you put your cursor in the formula bar?

  • ricardosanchezm Profile Picture
    86 on at

    Hi @Jeff_Thorpe ,

     

    I'm not getting any delegation warnings. According to the documentation simple line of text and choices (no multiselect) fields should be supported and my formula does not show any blue squiggly line.

     

    Regards.

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Can you drop a label on your screen and add the following to the text property: ddStatusFilters.SelectedText.Value

     

    Then use your original query which produces non results for the user's email and take a screenshot. I have thinking this isn't a delegation issue.

  • ricardosanchezm Profile Picture
    86 on at

    @Jeff_Thorpe ,

     

    Here are my screenshots:

    delegation5.png

     

    delegation3.pngdelegation4.png

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Can you try this formula and see if anything is returned for the email address. Trying to figure out which piece of the formula is causing the issue because there is no delegation warnings and everything looks like it should be delegable.

     

    SortByColumns(
        Filter(
            If(
                false;
                Filter(
                    Cuentas;
                    ddStatusFilters.SelectedText.Value = Tipo_cuenta.Value
                );
                Cuentas
            );
            StartsWith(
                EmailO365;
                TextSearchBox1.Text
            )
        );
        "EmailO365";
        If(
            SortDescending1;
            Descending;
            Ascending
        )
    )

  • ricardosanchezm Profile Picture
    86 on at

    @Jeff_Thorpe ,

     

    No success :(,

     

    formula1.pngdelegation7.png

    delegation6.png

  • Verified answer
    Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Ok, lets try changing where the IF() gets called. Hopefully I didn't make too many typos.

     

    SortByColumns(
     If(
     ddStatusFilters.SelectedText.Value = "Show All";
     Filter(
     Cuentas;
     StartsWith(EmailO365; TextSearchBox1.Text)
     );
     Filter(
     Cuentas;
     StartsWith(EmailO365; TextSearchBox1.Text);
     	ddStatusFilters.SelectedText.Value = Tipo_cuenta.Value
     )
     );
     If(
     SortDescending1;
     Descending;
     Ascending
     )
    )
  • ricardosanchezm Profile Picture
    86 on at

    That's it!! It shows the records up to 500 limit now.  The formula you bring me works excellent, it just showed me an error the first time beacause the parameter for Sort function was missing. The final formula will be:

     

    SortByColumns(
     If(
     ddStatusFilters.SelectedText.Value = "Show All";
     Filter(
     Cuentas;
     StartsWith(EmailO365; TextSearchBox1.Text)
     );
     Filter(
     Cuentas;
     StartsWith(EmailO365; TextSearchBox1.Text);
     	ddStatusFilters.SelectedText.Value = Tipo_cuenta.Value
     )
     );
    "EmailO365"; If( SortDescending1; Descending; Ascending ) )

    Thanks alot @Jeff_Thorpe !

     

    Regards,

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 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard