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 / Getting delegation war...
Power Apps
Unanswered

Getting delegation warning when filtering gallery against a contextupdate variable

(0) ShareShare
ReportReport
Posted on by 26

Good evening,

 

Im hoping someone might be able to help, i'm getting a delegation warning when trying to filter my gallery and i'm not to sure why. Here is the breakdown of my app

 

Sharepoint list is the source, its called Progress Tracker, 3 columns are named

Task, (text)

Progress, (text)

Start Date (date)

 

I have inserted a gallery that looks at this source, it displays fine. I have created 3 buttons (outside the gallery) that i want to filter the gallery on named

All

In Progress

Completed

 

I have added an Update Context function on the 'On Select' property of each button.

All - On Select = UpdateContext(
{filterAll: true, filterInProgress: false, filterCompleted: false})

 

In Progress - On Select = UpdateContext(
{filterInProgress: true, filterAll: false, filterCompleted: false})

 

Completed - On Select = UpdateContext(
{filterCompleted: true, filterInProgress: false, filterAll: false})

 

I have applied this filter on the items property of the gallery

Filter(
'Progress Tracker',
If(
filterCompleted,
Progress = "Completed",
filterInProgress,
Progress = "In Progress"

filterAll,
)
)

 

I am getting a delegation error on all the button filters when selected and i am not to sure why, im very new to powerapps and filtering in general so would be really grateful for any advice

 

Thank you

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @iamrufus 

    Your formula you provided is not syntactically correct!

     

    Beyond that, the formula editor cannot establish a delegable query when there are If statements in your formula.  Always best to avoid If statements in the criteria.

     

    Please consider changing your Formula to the following:

    Filter('Progress Tracker',
     !filterCompleted || Progress = "Completed",
     !filterInProgress || Progress = "In Progress"
    )

     

    However, I would suggest the following changes to your design...

    1) Change the formulas on the Button to the following:

    UpdateContext({filterBy: self.Text})

     

    2) Change your Items formula to:

    Filter('Progress Tracker',
     filterBy = "All" || Progress = filterBy
    )

     

    I hope this is helpful for you.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard