cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RvdHeijden
Post Partisan
Post Partisan

Visible property

Goodday, Ive got a simple question

 

I have an App with different tiles and I want to set the visible property based on different emailadresses but it doesn't seem to work.

 

In the APP in the OnStart function i've set a variable Set(varUserEmail; User().Email)

 

And on the tiles I set the visible property to this formula

varUserEmail=("Email")
Or varUserEmail =("Email")
Or varUserEmail =("Email")
Or varUserEmail =("Email")


Basically when I set the visible to a single emailadres is works but when I add more then 1 email everyone sees everything

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@RvdHeijden 

Yes, that visible property is not valid.

You need to perform a logical function.

Your formula on the Visible should be:  varUserEmail in varProjectTeamA & varProjectTeamB

 

In the above, the two variables are concatenated together (as they are text strings), then the in operator will return true or false if the varUserEmail text is in the concatenated text.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

6 REPLIES 6
MM_Factor
Frequent Visitor

Use in Visible:

If(Or(User().Email = "example1@xyz.com",User().Email = "example2.xyz.com"),true,false)
RandyHayes
Super User
Super User

@RvdHeijden 

I'd recommend putting your email addresses in a variable in your OnStart rather than directly in the formula as it will be far simpler to alter that list of emails from one place rather than multiple places.

 

So, in your OnStart - add:  Set(varEmails, "xxxx@mail.com; yyyy@mail.com;  zzzz@mail.com" )  

 

Then for your visible property:

varUserEmail in varEmails

The above is all you need in the visible to set it to be visible if the user is in the email list.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes that was my second question so I've skipped step 1 and now i'm going to step 2

 

Ive done the things that you have said, in this case I've added a variabel, two actually, for Projectteam A and Projectteam B (inc emailadresses) but when I set the visible property on the tiles there is an error which says that it's expecting a true/false and the tile remains invisible

 

Ive set the visibilty to varProjecTeamA and it returns the blue line

RandyHayes
Super User
Super User

@RvdHeijden 

The formula provided is correct and will return a true or false already.

If it is not, then there is something not defined properly with your variables.

Can you provide your current formula for the OnStart for setting the variables as well as the current formula you have in the Visible property (I assume you changed it as you are now including two variables).

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

This is the formula in the OnStart option

Set(varProjectTeamA;"Email1;Email2.;Email3");;
Set(varProjectTeamB;"Email1;Email2.;Email3")

 

The visible property on a specific tile is set to simply varProjectTeamA or varProjectTeamB

 

RandyHayes
Super User
Super User

@RvdHeijden 

Yes, that visible property is not valid.

You need to perform a logical function.

Your formula on the Visible should be:  varUserEmail in varProjectTeamA & varProjectTeamB

 

In the above, the two variables are concatenated together (as they are text strings), then the in operator will return true or false if the varUserEmail text is in the concatenated text.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,961)