Skip to main content

How to Show or Hide a Control in Power Apps with Visible

· 4 min read
Jagdish Kumawat
Founder @ Dewiride

Every control in a canvas app has a Visible property. Set it to a formula that's true or false, and the control appears or disappears as the formula changes. It's how you show a My team button only to managers, or a message only when something is missing.

Prerequisites​

  • A control to show or hide. The example is the My team button (btnMyTeamHS) on the Career Development Plan app's Home screen, from Part 4 of the series.
  • A true-or-false value to decide with. The example uses IsManager, a named formula that's true when the signed-in person has direct reports; see How to Use Not in Power Apps for how it's built.

Step 1: Set Visible to a Formula​

Select the control, choose Visible in the property list, and enter a formula that gives true or false:

btnMyTeamHS → Visible
IsManager

The preview strip shows the current value. For the signed-in admin in the example, who has a direct report, it's true, and both buttons show:

The formula bar with the Visible property of btnMyTeamHS set to IsManager, the preview strip reading IsManager = true with Data type boolean, and both the My plan and My team buttons on the canvas

Step 2: See It Hidden​

To check what non-managers see, the example temporarily reversed the condition:

btnMyTeamHS → Visible (test only)
!IsManager

The value becomes false, and the button disappears from the canvas:

The formula bar with Visible set to !IsManager, the preview strip reading !IsManager = false with Data type boolean, and only the My plan button left on the canvas

Because the buttons sit in a horizontal container, the hidden button leaves no gap. Set it back to IsManager afterwards.

Formulas You Can Use​

Anything that gives true or false works:

Show the control when…Visible
The person is a managerIsManager
They aren't!IsManager
A value is missingIsBlank(MyManager)
A table has rows!IsEmpty(MyDirectReports)
Always / nevertrue / false

IsBlank vs IsEmpty in Power Apps explains the two tests.

Hiding Isn't Security​

Visible only changes what the screen shows. Someone who shouldn't see data can't be stopped by hiding a button: the data source's own permissions have to stop them. In the Career Development Plan series, SharePoint permissions do that job; the app's visibility rules just keep the screens tidy.

Common Mistakes​

MistakeWhat happensDo this instead
Leaving a test condition such as !IsManager in placeManagers lose the buttonSet it back after testing
Relying on Visible to protect dataThe data is still reachableProtect the data source with permissions
Testing only as yourselfYou never see the other stateReverse the condition briefly, or test as another user

Troubleshooting​

SymptomLikely causeFix
The control never appearsThe formula is always false, or blankCheck the value in the preview strip
A gap is left where it wasIt isn't in an auto-layout containerPut it in a horizontal or vertical container
It shows for the wrong peopleThe condition is the wrong way roundCheck for a missing or extra !

FAQ​

Does a hidden control still cost anything?​

Little. Studio's Settings → Updates → Retired lists an optimization, on unless you disable it, under which hidden controls are only created when they become visible.

Can I hide a whole group?​

Yes. Hide the container, and everything inside goes with it.

What's the difference between hidden and disabled?​

Hidden (Visible false) removes the control from view. Disabled (DisplayMode = DisplayMode.Disabled) shows it greyed out so people know it exists.

Conclusion​

Set Visible to a true-or-false formula, check both states while building, and let containers close the gap. Use it for tidiness, and keep real access control in your data source.

Additional Resources​

Stay Updated

Subscribe to our newsletter for the latest tutorials, tech insights, and developer news.

By subscribing, you agree to our privacy policy. Unsubscribe at any time.