Announcements
I was able to get the following working in the studio, but now when I go to the live publish version it no longer works.
https://powerusers.microsoft.com/t5/Building-Power-Apps/Hide-Button-based-on-value-in-Gallery/m-p/845494#M268765
I did have to change Set(Vis,"true");IsBlank(LookUp(Gallery1.AllItems,Name.Email=User().Email, true)) to Set(Vis,"true");IsBlank(LookUp(Gallery1.AllItems,Name.Email=User().Email)) for it to work in the studio, but it is still not working on the live version.
@send2mark
This is because you are mismatching your return types. Plus you are setting, what you think is a boolean, to a text value and using that as a boolean for Visible. Designer is fine with it but player does not like that.
Change your Visible property to the following:
With({_user:User().Email}, LookUp(Gallery1.AllItems, _user in Name.Email, true))
I hope this is helpful for you.
I found that also, but unfortunately, I found a bigger issue.
Our company uses the username to sign in to Microsoft services where most people use their email addresses. So when comparing the two, it will always be false.
example:
jsmith@microsoft.com
John.smith@microsoft.com
You can utilize the Office 365 User information to try and rectify that.
Add the Office 365 Users Connector to your app.
With({_user: Office365Users.MyProfileV2().userPrincipalName}, LookUp(Gallery1.AllItems, _user in Name.Email, true))
Otherwise, how can you get to a matching email?
That was a great idea, but it is still not working and with no errors.
I verified that both matched by using a text label for the Office365Users and on the gallery, I updated the display to show the mail. I then put what you gave me into a text Label also and it says false.
So, here is the bigger question...does your Gallery have information in it, or is it blank?
Right now it is blank so I can get the button back. Once I see the button I will add an item to see if it goes away. I did put in an item just now with a different username, but it is still false.
So if your gallery is blank, then that would be the start to the issue.
You said you put in an item and it was false...did it show up in the gallery?
So this is an even sign-up form. The gallery shows who is attending and I do not want someone signing up twice. So if joe@microsoft.com submits the form, he will be in the sharepoint list with his name in the People field called Name. Those people will be displayed in the gallery for others to see. It does not have to run off the gallery, it was just the only way that made sense to me.
If he attempts to sign up again for himself or for someone else, he will not have the option to click on the submit button.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 505
WarrenBelz 502 Most Valuable Professional
Haque 324