I am customizing a SP form with PowerApps called Requests. This is one of my first PowerApps forms, so please keep that in mind. Currently, I am trying to hide a button/label to only display based on particular users. I've decided to do this by creating a SP List that contains the user emails for the individuals whom need to see the button. The list is called Admins. The list has one column entitled 'Title.' This column contains the email addresses of the individuals that need to view the button.
In my PowerApps form, I am doing some general testing to ensure that values are returned from the Admins list. I have made two connections -- one to the SP form that I am customizing, and one to the Admins list which holds the emails.
In the app, I have created a function that sets a variable when it loads. Onstart = Set(varEmail, User().Email)
to store the logged in user's email address. On the button/label that I wish to hide/show based on the email, I have added a function to lookup the email addresses from the Admin List, check if the variable equals the current logged in user's email address and hide the button accordingly. I have used this code on the label text field to test: LookUp(Admins, Title = varEmail).Title
It does not print anything out such as an email address. Instead, it returns a blank value even though the list has been populated. When I've used the IsBlank function to test if there are blanks, it returns true. I've refreshed the connection and this still is happening.
What am I doing wrong?