cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

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
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
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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (47,513)