cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
3csman
Impactful Individual
Impactful Individual

Condition and Variable Check

I have Button. I only want the button to be Visible to those with 'National' access.

 

Assuming how I set the variable in the App OnStart (as shown below) is correct:

 

     Set(varIsNational,If(User().FullName="Popeye daSailor", true ,User().FullName="Peppy LePew", true ,User().FullName="Jack

     Sprat", true ,User().FullName="Jessica Rabbit", true , false ));

 

Is the following condition correct for achieving my goal is I place it in the Button Visible property; or should it just be varIsNational:

 

     If(varIsNational=true, true,false)

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

Since you are setting the variable to a boolean value its actually even easier.  Just set visible to varIsNational.  No IF() required.  But either way will work.

 

My one suggestion would be to switch it to User().Email instead of DisplayName.  Display Name can change and isn't guaranteed to be unique.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Pstork1
Dual Super User III
Dual Super User III

Since you are setting the variable to a boolean value its actually even easier.  Just set visible to varIsNational.  No IF() required.  But either way will work.

 

My one suggestion would be to switch it to User().Email instead of DisplayName.  Display Name can change and isn't guaranteed to be unique.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (46,229)