cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
send2mark
Resolver I
Resolver I

Does not work on live version

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/84...

 

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.

8 REPLIES 8
RandyHayes
Super User III
Super User III

@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.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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

 

RandyHayes
Super User III
Super User III

@send2mark 

You can utilize the Office 365 User information to try and rectify that.

Add the Office 365 Users Connector to your app.

Change your Visible property to the following:

With({_user: Office365Users.MyProfileV2().userPrincipalName}, LookUp(Gallery1.AllItems, _user in Name.Email, true))

 

Otherwise, how can you get to a matching email?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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.

RandyHayes
Super User III
Super User III

@send2mark 

So, here is the bigger question...does your Gallery have information in it, or is it blank?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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. 

RandyHayes
Super User III
Super User III

@send2mark 

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?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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.

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (72,809)