cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ACPBSCi
Resolver I
Resolver I

Why did my Power Apps filter stop working?

Why did my Power Apps filter stop working? It was working fine when we rolled it out. When the user opens the app, the default Browse screen was filtered to show them only their entries:
 
SortByColumns(Filter('List Name','Created By'.Email=User().Email && Completed = false, StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))
 
The "Title" column is populated with a unique ID and that's what I want to sort by.
 
It used to work, but now it doesn't work at all. The last part of the expression If(SortDescending1, Descending, Ascending)) has a red squiggly line under it. When I remove it, it still doesn't work. Any ideas?
 
When I remove the filter and just leave it with the default value of the list name, it shows me everything, so it doesn't seem like there's anything wrong with the gallery itself.
1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @ACPBSCi ,
Firstly User().Email is not Delegable, so at App OnStart put this

Set(varUserMail,User().Email)

Then do this

SortByColumns(
   Filter(
      'List Name',
      'Created By'.Email=varUserMmail && 
      Completed = false && 
      StartsWith(Title, TextSearchBox1.Text)
   ), 
   "Title", 
   If(
      SortDescending1, 
      Descending, 
      Ascending
   )
)

Also how many items are in your list?

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

1 REPLY 1
WarrenBelz
Super User III
Super User III

Hi @ACPBSCi ,
Firstly User().Email is not Delegable, so at App OnStart put this

Set(varUserMail,User().Email)

Then do this

SortByColumns(
   Filter(
      'List Name',
      'Created By'.Email=varUserMmail && 
      Completed = false && 
      StartsWith(Title, TextSearchBox1.Text)
   ), 
   "Title", 
   If(
      SortDescending1, 
      Descending, 
      Ascending
   )
)

Also how many items are in your list?

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (30,978)