- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2019 03:23 AM
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
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2019 03:32 AM
Try below script
//Type: Onchange
function onChange() {
g_form.setSectionDisplay('security_incident', false)
if(g_form.getValue("u_template") == "Security Incident")
{
g_form.setSectionDisplay('security_incident', true);
}
else
{
g_form.setSectionDisplay('security_incident', false);
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2019 03:26 AM
try now
Type: Onchange
function onChange() {
var sections = g_form.getSections();
if(g_form.getValue("u_template") == "Security Incident"){
sections[4].style.display='none';
}else{
sections[4].style.display='block';
}
//g_form.setSectionDisplay('Security Incident', false);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2019 03:26 AM
array index would be 4 here.
it starts from 0 index
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2019 03:32 AM
Try below script
//Type: Onchange
function onChange() {
g_form.setSectionDisplay('security_incident', false)
if(g_form.getValue("u_template") == "Security Incident")
{
g_form.setSectionDisplay('security_incident', true);
}
else
{
g_form.setSectionDisplay('security_incident', false);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2019 03:44 AM
This worked for me Thanks 🙂