cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mandy4514
Level: Powered On

Button to show when multiple conditions are met

2019-07-09 08_14_24-LDP Participant - Saved (Unpublished) - PowerApps.png

 

I have a form with 3 tabs at the top and use visible function to show/hide items in form depending on tab selected.  Within the form I have a pen icon.  It needs to appear on the "Profile" tab always.2019-07-09 08_10_14-LDP Participant - Saved (Unpublished) - PowerApps.png

It needs to only show on "Benchmark" tab only if logged in user is in in the Cohort Consultant field on "Profile" tab of that form. 2019-07-09 08_09_56-LDP Participant - Saved (Unpublished) - PowerApps.png

And it never needs to show up on the 3rd "Assignments" tab.

 

I am trying to play with the visibility property of this icon to acomplish above.

My current formula is:

If(varFormTab="Benchmarks" && 'Cohort Consultant'.Email=_myProfile.Mail,true,varFormTab="Profile",true,false)

but this is not accomplishing this correctly.  Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Button to show when multiple conditions are met

Hi @mandy4514 ,

Could you tell me 

1)is varFormTab and varFormTab label's name?

2)is Cohort Consultant field's data type person?

Try this formula: (DatacardValue5 is Cohort Consultant field's control's name)

If((varFormTab.Text="Benchmarks" && First(DataCardValue5.SelectedItems).Email=User().Email)||
varFormTab.Text="Profile",
true,false)

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
panand99
Level 10

Re: Button to show when multiple conditions are met

hi @mandy4514 

 

check if user email in cohert consultant field is compared to user emial.

 

User proper() and then check

 

Re: Button to show when multiple conditions are met

I would suggest

 

Switch(

              varformtab,

              "Profile",true,

              "Benchmark",If(Office365Users.MyProfile().Status = Cohort Consultant,true,false),
              "Assignments",false

             )

 

Hope this helps 🙂

Super User
Super User

Re: Button to show when multiple conditions are met

@mandy4514 

In general, your formula looks correct based on what you want to do.  So, that makes me wonder if the values are actually as you expect them.  More importantly, what is 'Cohort Consultant' ?   I realize this is most likely a column in your data source, but what context are you in?  A Form?  A Gallery? None of the above?

 

First - Try to change your formula to the following to make sure at least you are comparing values in the email in the same case.

 

If(varFormTab="Benchmarks" && Lower('Cohort Consultant'.Email) =Lower(_myProfile.Mail), true,
varFormTab="Profile",true,
false)

Also, you can tighten up this formula to the following:

((varFormTab="Benchmarks" && Lower('Cohort Consultant'.Email) =Lower(_myProfile.Mail)) || varFormTab="Profile")

No change?

Next, I would inspect your varFormTab variable and make sure that it has the value you expect it to have (in the proper spelling and case).

 

Next, I would look at the label that holds the value of the 'Cohort Consultant' email address and note its name - let's all it lblConsultant for now.  I would then change the formula to the following:

((varFormTab="Benchmarks" && Lower(lblConsultant.Text) =Lower(_myProfile.Mail)) || varFormTab="Profile")

 

See if any of the above is of help.  I hope it is.

_____________________________________________________________________________________
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.
Community Support Team
Community Support Team

Re: Button to show when multiple conditions are met

Hi @mandy4514 ,

Could you tell me 

1)is varFormTab and varFormTab label's name?

2)is Cohort Consultant field's data type person?

Try this formula: (DatacardValue5 is Cohort Consultant field's control's name)

If((varFormTab.Text="Benchmarks" && First(DataCardValue5.SelectedItems).Email=User().Email)||
varFormTab.Text="Profile",
true,false)

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,556)