I was wondering if it was possible to activate automatically a tab into cr detail screen based on certain conditions. For example, in an incident with service type, the "Service type" would be active. If there's Properties, the Properties would be active. And so on.
I understood, you can show or hide the tabs by conditionally. Following sample code may be answer your need.
<PDM_IF "$args.properties.length" != "0"> <PDM_MACRO name=tab title="Ek Alanlar" file="xx_prop_tab.htmpl"> </PDM_IF>
When the web engine generate the detail_cr.htmpl, if there is no property define then properties tab not shown.
Also same think for service type tabs
<PDM_IF "$args.sla_events.length" != "0"> <PDM_MACRO name=tab title="Servis Türü" file="xx_stype_tab.htmpl" id=stype> </PDM_IF>
This can do the trick but I think that all tabs with possible inputs should be displayed in Edit mode otherwise category change (from category w/o props to one with) can cause error about missing required fields. So condition should be:
<PDM_IF "$args.properties.length" != "0" || "$prop.form_name_3" == "edit">
Touch a good point. Thank you for your improvement cdtj
Your code will hide or show tabs before the page is loaded. But what I'm looking for is a way to "bring one tab to the top", with all tabs being accessible. This is what I mean for activating a tab.
Thanks for clarification, you can call:
to switch between tabs.