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

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
Helper II
Helper II

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

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.
v-monli-msft
Community Support
Community Support

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.

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

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
Helper II
Helper II

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
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 (990)