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 / How to show/hide Secti...
Power Apps
Answered

How to show/hide Section or Tab in model-driven apps using business rules?

(0) ShareShare
ReportReport
Posted on by 21
Categories:
I have the same question (0)
  • H V Profile Picture
    1,510 on at

    Hi @HarminderSethi

    YYou can not hide show tab or section using business rule.

    You need to use javascript for hide show tab or section. 

     

    function hideTab(executionContext) {
    formContext = executionContext.getFormContext();
    var tabObj = formContext.ui.tabs.get("tabname");
    tabObj.setVisible(false);
    //For show tab
    //formContext.ui.tabs.get("tabname");
    tabObj.setVisible(true) ;

     

    Please review ms doc:

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/formcontext-ui-tabs

  • HarminderSethi Profile Picture
    21 on at

    Thanks @hardikv i went through this artical intially and thought may be the docuentaion is not updated or i am missing something.

     

    I think this feature should be added as there are times when we need to show/hide the complete section based on the condition and need to make the fields required or optional within the section. Now fields can be made required/optional or show/hide using business logic but just to show/hide the section we have to use the code/javascript.

  • Verified answer
    H V Profile Picture
    1,510 on at

    Hi @HarminderSethi

    Yes, you can hide/show/required/optional fields using Business Rules and Hide/show tab or section using JavaScript.

     

    Please mark as solution if this helps you! 

  • Vipin J Profile Picture
    8 on at

    I have created some Generic Method to Hide and Show Tab and Section

    Please refer here : https://vjcity.blogspot.com/2021/07/generic-method-to-hide-and-show-tab-and.html

  • Boppersnr1 Profile Picture
    137 on at

    awesome. I have emailed you for more info. Much appreciated.

  • Karrar Profile Picture
    9 on at

    You could hide an entire section using business rules by adding the fields you want to hide and show at the same time into the section and hiding the section label. Then using a business rule to hide all fields based on certain criteria or show all fields. That will hide and show the entire section. 

    I have created a quick video to demonstrate this.

    https://www.youtube.com/watch?v=-X-3cXDBbzI&t=21s

  • Karrar Al-Rubayee Profile Picture
    2 on at

    .

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
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard