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
Solved! Go to Solution.
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.
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)
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
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
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.
User | Count |
---|---|
159 | |
85 | |
68 | |
63 | |
61 |
User | Count |
---|---|
209 | |
151 | |
93 | |
81 | |
69 |