How to hide sections using client script but the section's name are not in English
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi,
Im trying to hide sections using onLoad client script using g_form.setSectionDisplay but the problem is that the section's name are not in English. When I do alert(g_form.getSectionNames()) the system recognize the name of the sections as '_', and I have few of thems. What can I do?
This is the Alert result:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
try this and see if this works
// pass section name and then use
getMessage("work_ordertask", function(msg) {
g_form.setSectionDisplay(msg, false);
});
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
@Ankur Bawiskar still not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
@Ankur Bawiskar the problem is that because i have two sections with non English label, the system recognize both of them as '_'.
So basically i have two sections with the name '_'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
why you have section with name as _ and don't have any english word for that?
doesn't look like a valid business requirement
section should have some name to it
how it looks on form -> share screenshots
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader