Code To Change Section Name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 12:18 AM
Hello vinitha,
Here we can discuss.
I have three sections R1,R2 and R3.
When my form loads there is a field which fetches New Section name from another table (Config table)
Only i have to do is Whenever form loads R1,R2 and R3 should be changed by that New Section Names which will come from Config Page .
Please help from a beginning.
Regards,
Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 12:32 AM
Hello Kumar,
Try System UI>Form Sections.
Refer the below links may helpful to you.
ServiceNow Commnunity MVP -2018 class.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 12:56 AM
var currentLabel = 'Candidate Registration Test';
var newLabel = 'Changed Label';
var labelEl = $$('.form_header')[0];
var newHTML = labelEl.innerHTML.replace(currentLabel, newLabel);
labelEl.innerHTML = newHTML;
This is Applicable for Table Name Change (0 th Position Section ) But for 1th Position (R1 Section ) .
it is not applicable when i am writing var labelEl = $$('.form_header')[1]; instead of 0 th element.
Do you have any idea why it is not working...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 01:02 AM
Hi Kumar,
Try this,
$$('.tab_caption_text').each(function(caption) {
if(caption.innerHTML == 'R1'){
caption.innerHTML = 'NewR1';
}
Thanks,
Vinitha.K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 01:12 AM
Perfect. Thank you so much . it worked perfectly. (y)
Regards Kumar _/\_