Show or Hide Tab in Model Driven app

| Muhammad Uzair

Hide/Show Tab in Model-Driven app

We can show or hide the tabs in the model driven apps with these scripts.

Just for hiding tabs:
formContext.ui.tabs.get("TrackDispatchtab").setDisplayState(false);

Just for Showing tabs:
formContext.ui.tabs.get("TrackDispatchtab").setDisplayState(true);

function HideTrackDispatchSubGrid(executionContext){

    var formContext = executionContext.getFormContext();

    var requestinlandtowing = formContext.getAttribute("gs_requestinlandtowing").getValue();

    if(requestinlandtowing == false){

        formContext.ui.tabs.get("TrackDispatchtab").setDisplayState(false);

    }

    else{

        formContext.ui.tabs.get("TrackDispatchtab").setDisplayState(true);

    }

}

Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.


M
Chief Architect, Founder, and CEO - a Microsoft recognized Power Platform solution architect.

About The Blog

Stay updated with what is happening in the Microsoft Business Applications world and initiatives Imperium is taking to ease digital transformation for customers.


More About Us

We provide guidance and strategic oversight to C-Suite and IT Directors for on-going implementations. Feel free to give us a call.

1 331 250 27 17
Send A Message

Ready to Start?

Get a personalized consultation for your project.

Book a Meeting