Hide sections in form incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2024 01:11 AM
Hi,
I want that under certain conditions:
that when the location of the caller_id is Londrina ADM
And when the company is Adama Brasil S.A.
So I want to hide the form section from the form.
Thanks, Shir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2024 01:24 AM
You can use UI policies to hide sections. Pls refer to this post-
Regards,
Amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2024 01:41 AM - edited 06-26-2024 01:49 AM
Hello @Shir Sharvit
Use the UI polices for the hide section :
condition: caller location Londrina ADM
company is Adama Brasil S.A.
Please refer below link it will help you:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0696583
If my answer is helpful please mark it as helpful or correct!!
Pratima.k
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2024 04:10 AM - edited 06-27-2024 04:16 AM
Hello @Shir Sharvit
Please try onload client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2024 02:04 AM
Hi @Shir Sharvit ,
You can do this through UI policy or client script,
I have tried onchange client script please check the code below,
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var caller = g_form.getReference('caller_id', getcallerDetail);
function getcallerDetail(caller) {
if(caller.location == '3e94ed7437d0200044e0bfc8bcbe5d9b' && caller.company == '227cdfb03710200044e0bfc8bcbe5d6b') //here add the location sysid and company sysid
{
g_form.setSectionDisplay('notes',false);
//alert('inside');
//alert(g_form.getSectionNames()); //to get the section names
}
else{
g_form.setSectionDisplay('notes',true);
}
}
}
Note: If you want to use it when page loads then create one more Onload client script add the same code it will work .
Please check and Mark Helpful and Correct if it really helps you.
Regards,
Swathi Sarang