Notifications
Announcements
Hello,
Is it possible to set the default tab (section) in Dataverse form based on a preexisting value in one of the form's field?
My case: Based on the Value in Field A set default Tab as to either GSP Validation or CTFO Validation?
Thank you
Hi @AhmedSalih ,
Is the following post helpful? Shows JavaScript to set Default Tab and maybe you can evaluate your field in the JavaScript as well to set the appropriate tab?
https://community.dynamics.com/365/sales/f/dynamics-365-for-sales-forum/408237/change-default-tab-on-an-entity
@dpoggemann , just for the other community members reference, I have created the script to hide a form's tab based on the value of field on the form:
function HideTestTab(executionContext) { var formContext = executionContext.getFormContext(); var action = formContext.getAttribute('action').getValue(); //This is a choice column so the value is the number value -- action is the logical name of the column var tabToHide = formContext.ui.tabs.get('tab_test'); //tab_test is the name of the tab if (action == '100000005') //Value of selected item in a choice column, if a text value, type the text value instead {tabToHide.setVisible(false);} else {tabToHide.setVisible(true);} }
Note: To set a tab as default, we can use the .setFocus instead of .setVisiable >> https://docs.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/formcontext-ui-tabs/setfocus
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 765 Most Valuable Professional
Michael E. Gernaey 343 Super User 2025 Season 2
Power Platform 1919 272