web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Button to show when mu...
Power Apps
Answered

Button to show when multiple conditions are met

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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?

Categories:
  • panand99 Profile Picture
    641 on at

    hi @Anonymous 

     

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

     

    User proper() and then check

     

  • MatthewInwards Profile Picture
    138 on at

    I would suggest

     

    Switch(

                  varformtab,

                  "Profile",true,

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

                 )

     

    Hope this helps 🙂

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    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.

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    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

  • Evil353 Profile Picture
    4 on at

    Try changing the formula to use the tab number instead of the name i.e. if(varFormTab=2....

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard