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
Super User

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
Super User

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,786)