cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rianne1
New Member

How to solve delegation issue of filter with conditions?

Hi all,

 

Still new to Power Apps, and couldn't quite google myself out of this issue.

I have a gallery that I want to filter on partner name using text input, and using a toggle for optional inclusion of completed items.

By default the completed items are hidden.

Below code on items of BrowseGallery1 is working as intended, but has a delegation risk.

 

If(Toggle1.Value = false,
Filter('Learning Demand',
'Demand Status2' <> "Completed",
StartsWith('Partner Name',TextSearchBox1.Text)),
Filter('Learning Demand',

StartsWith('Partner Name',TextSearchBox1.Text)))

 

Who can help me solve this?

 

Many thanks!

Rianne

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

@Rianne1 

Assuming that SharePoint is your data source, the problem is that the <> is not delegable.

There's no simple workaround except to use the = operator and to specify all the other status types other than "Completed".

If(Toggle1.Value = false,
Filter('Learning Demand',
'Demand Status2' = "Started" || 'Demand Status2' = "In Progress" || 'Demand Status2' = "etc..",
StartsWith('Partner Name',TextSearchBox1.Text)),
Filter('Learning Demand',

StartsWith('Partner Name',TextSearchBox1.Text)))

View solution in original post

2 REPLIES 2
timl
Super User
Super User

@Rianne1 

Assuming that SharePoint is your data source, the problem is that the <> is not delegable.

There's no simple workaround except to use the = operator and to specify all the other status types other than "Completed".

If(Toggle1.Value = false,
Filter('Learning Demand',
'Demand Status2' = "Started" || 'Demand Status2' = "In Progress" || 'Demand Status2' = "etc..",
StartsWith('Partner Name',TextSearchBox1.Text)),
Filter('Learning Demand',

StartsWith('Partner Name',TextSearchBox1.Text)))
Rianne1
New Member

@timl That was an easy fix, thank you!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,628)