I am building a canvas app and would like for a label to display a user's designated access level based on a lookup function to a table and their current email address. I have a variable (CurrentUser) set up to capture the user's email address when the app loads, as this value is used in multiple other places throughout the app. My formula in the label's Text property is set up as follows:
Lookup(Table2, CurrentUser = EmailAddressColumn, AccessLevel)
The problem is that the formula keeps returning a blank value, even though I have confirmed that Table2 does contain the email values I need. Am I missing something?
There are a couple of ways your LookUp() can go sideways:
Hope that helps,
Be cautious with letter case of the email address. The User() function (if that is what you are using) can sometimes return an email address with a different case than you expect.
Change your formula to the following to overcome that:
Lookup(Table2, StartsWith(EmailAddressColumn, CurrentUser) , AccessLevel)
I hope this is helpful for you.
The Super User program for 2022 - Season 2 has kicked off!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.