cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ddas
Level: Powered On

Filter formula not working

Hi All,

 

I have this formula for a gallery that connects to a sharepoint list. It's supposed to show the Employee and if its a manager the employees under that manager. It used to work fine but now it doesn't. Below is the formula.

 

Filter('2019 Goal Settings Form', 'Employee Name'=User().FullName Or 'Created By'.Email=User().Email || 'Manager Email Address:'=User().Email)

 

It seems to work for some people and not others. Any ideas why that is and is there another version of the formula that I can use and will do the same thing. 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
ddas
Level: Powered On

Re: Filter formula not working

I changed the formula to this, Filter('2019 Goal Settings Form', 'Employee Name'=User().FullName || 'Created By'.Email=User().Email || 'Manager Name'=User().FullName) and now it is working. 

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Filter formula not working

Try setting a global varible in the App OnStart or the Screens OnVisible with the current user information.

Set(gvCurrentUser, User())

 

Then tweak the formula like this:

Filter('2019 Goal Settings Form', 'Employee Name'=gvCurrentUser.FullName || 'Created By'.Email=gvCurrentUser.Email || 'Manager Email Address:'=gvCurrentUser.Email)



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: Filter formula not working

Hi @ddas ,

 

Is 'Manager Email Address:' a text column that stores the email address of the user's manager? If so, then you shouldn't Filter it with User().Email. User().Email is the email address of current user, not his manager. 

 

You should add the Office 365 Users connector to this app, and then use a below formula instead:

Filter('2019 Goal Settings Form', 'Employee Name'=User().FullName ||'Created By'.Email=User().Email || 'Manager Email Address:'=Office365Users.Manager(User().Eamil).Mail)

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ddas
Level: Powered On

Re: Filter formula not working

Hi v-monli-msft,

 

Thanks for the response. That formula will not work because it ends up showing all the users that share the same manager which is not what we want. I'll give you more detail. If a user is not a manager they will only see their form. If a manager opens the app they see their form but also the people they manage only. Hope that makes it clear what we are trying to do.

 

Regards,

 

ddas

ddas
Level: Powered On

Re: Filter formula not working

Hi Jeff,

 

Thanks for the response. I'm still pretty new to powerapps and formulas so I'm not sure how to implement your solution. I copy and pasted the formulas but the gallery wouldn't show anything when I did. Not sure how to proceed from there. 

 

Regards,

 

ddas

ddas
Level: Powered On

Re: Filter formula not working

I changed the formula to this, Filter('2019 Goal Settings Form', 'Employee Name'=User().FullName || 'Created By'.Email=User().Email || 'Manager Name'=User().FullName) and now it is working. 

View solution in original post

Helpful resources

Announcements
thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,706)