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 Apps
Unanswered

Delegation warning

(0) ShareShare
ReportReport
Posted on by 14

I'm using the following code for this gallery.Items:

Switch(
    Localsortcolumn,
    "number",
    SortByColumns(
        Filter(
            CREAT,
            (IsBlank(FilterCountry) || COUNTRY_CODE = FilterCountry) , (IsEmpty(FilterTeams) || CREA_TEAM in FilterTeams.Value) , (IsEmpty(FilterStatuses) || STATUS in FilterStatuses.Value) , (IsBlank(FilterAnalyst) || CREDIT_ANALYST = FilterAnalyst) , (IsBlank(FilterDate) || NEXT_REVIEW_DATE <= FilterDate)
        ),
        "CUSTOMER_NO",
        If(
            localsortascending,
            SortOrder.Ascending,
            SortOrder.Descending
        )
    )
)
 
It is a SharePoint list with 26000 records. Would you recommend a different approach?
 
Thank you!
Categories:
  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at
    Localsortcolumn, "number", SortByColumns( Filter( CREAT, (IsBlank(FilterCountry) || COUNTRY_CODE = FilterCountry), (IsEmpty(FilterTeams) || CREA_TEAM in FilterTeams.Value), (IsEmpty(FilterStatuses) || STATUS in FilterStatuses.Value), (IsBlank(FilterAnalyst) || CREDIT_ANALYST = FilterAnalyst), (IsBlank(FilterDate) || NEXT_REVIEW_DATE <= FilterDate) ), "CUSTOMER_NO", If(localsortascending, SortOrder.Ascending, SortOrder.Descending) ) )

    hi @fpsdf ,

    try this:

    Switch(
                          
  • fpsdf Profile Picture
    14 on at

    hey @anandm08 , thank you!

    but there seems to be no difference between my code and yours... I'm still getting the same warning

  • Francisco_RM Profile Picture
    2 on at
  • uwenagel Profile Picture
    382 on at

    There is a common trick I use in this circumstance:

     

    Instead of filtering the table direct you add an AddColums to the formula by just copying the ID into a new column (I call it IDS).

     

    Switch(
     Localsortcolumn,
     "number",
     SortByColumns(
     Filter(
     AddColumns(
     CREAT,
     IDS,
     ID
     ),
     (IsBlank(FilterCountry) || COUNTRY_CODE = FilterCountry),
     (IsEmpty(FilterTeams) || CREA_TEAM in FilterTeams.Value),
     (IsEmpty(FilterStatuses) || STATUS in FilterStatuses.Value),
     (IsBlank(FilterAnalyst) || CREDIT_ANALYST = FilterAnalyst),
     (IsBlank(FilterDate) || NEXT_REVIEW_DATE <= FilterDate)
     ),
     "CUSTOMER_NO",
     If(localsortascending, SortOrder.Ascending, SortOrder.Descending)
     )
    )

     

    This way the data is loaded into memory and the delegation is gone.

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard