How to display the section/tab in incident form ?

NK32
Kilo Expert

Hi Team,

I would like to display the section/tab(Security Incident) when the 'Incident Type' is chosen 'Security Incident'.
The section/tab(Security Incident) should be hidden when the 'Incident Type' is not chosen 'Security Incident'.

Client script :

Type: Onchange
function onChange() {
var sections = g_form.getSections();
if(g_form.getValue("u_template") == "Security Incident"){
sections[5].style.display='none';
}else{
sections[5].style.display='block';
}
//g_form.setSectionDisplay('Security Incident', false);
}

Kindly assist on this please

Regards,
NK