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
18 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
17 hours ago
@Ankur Bawiskar i dont have a section name as '_'.
I have a section name in Hebrew but the system convert it to '_' because its non English letters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
17 hours ago
always give section name in english and system will store the translation value automatically
then use the script I shared and it will work for both English and other language
-> rename that section with English word
💡 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
17 hours ago
Script I shared is working fine when you have proper section name and the script hides it when language is switched
💡 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
17 hours ago
@Ankur Bawiskar yes its working when the section's name is in English but my section name needs to be display to the user in a different language than English because they are not using the system in English. So this solution is not helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
17 hours ago
@Ankur Bawiskar my section's name is a customize name and the system does not has an automatic translation for that