Use Case: We have many forms (100+) that use the Tab Control. When we use the Tab Control, there will always be 4 Tabs on every form. These tabs are called Traceability, Attachments, Training & Control.
We have a User Profile that determines if/when the User will be able to see these Tabs (i.e.: We use tabs.disabled conditionally based on User and some other factors where “x” is the Tab reference in the Tabs array). For a given User/Tab combination, the value is either true/false for all 100 + Forms. If they can see the Control Tab in one form, it is fine for them to see the Control Tab in all the forms.
For the Tab with the title “Control”, in some forms it might be tabs[6].disabled in the Tab array and in other Forms it might be tabs[8].disabled ion the Tab array. See below:
We are moving all our js Form Code into an external js file and want to have just one set of conditions to disable/enable these four Tabs.
We are trying to figure out how to reference the Tab id by the title of the Tab rather than by its index in the Tab array.
So, the end result is, logically, something like tabs.[tab.title == ‘Control’].disable
This way, it does not matter where the Tab is in the Array.