Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Button visibility based on conditions


I am trying to combine the visibility of my button based on active tabs and current user email. Below is my formula in Button Visible:

varTab = "Details" And
If(displayItem.Status.Value = "Open" || displayItem.Status.Value = "Pending",  displayItem.PIC.Email = CurrentUserProfile.Email, true, false)

OnSelect formula for the tab button:

Set(varTab, "Details")

There is no error but it seems the button is not displaying based on the condition stated. Appreciate the help on what I can do to solve this. Thanks!

Super User
Super User

have you tried putting varTab = "Details" And inside the if statement, at the minute its sitting outside. 


If(And(varTab = "Details",displayItem.PIC.Email = CurrentUserProfile.Email,Or(displayItem.Status.Value = "Open", displayItem.Status.Value = "Pending")), true, false)


If() functions are not usually necessary in Visibility since the conditions will reduce to either true or false when the logic is properly constructed.


Hi @C-Papa ,
i tried this way but the button seems to not show up at all..

thank you for the clarification. how do you suggest i approach this matter? as i have created two button one to display when the status is "open" or "pending" which will be shown for PIC. While the other button will be displayed for the requestor when the status is "resolved"..

Advocate I
Advocate I



Kindly try this formula onVisible of button

If(displayItem.Status.Value = "Open" || displayItem.Status.Value = "Pending",  displayItem.PIC.Email = CurrentUserProfile.Email, varTab=true, varTab=false)

 And apply onSelect formula in Tabbutton(means whatever your button name)






sorry apply this formula on Tab Button

And apply the onSelect formula in Tabbutton(means whatever your button name)




Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,150)