I want to change the field labels for related lists on a per-table basis.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
I want to change the custom field labels on a per-table basis.
I thought this could be achieved by simply adjusting the labels.
However, the field labels displayed in the related list did not change.
The related list is implemented using relationship records.
Is there a good way to handle this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
if you change field label and that field is part of related list, it will show the new label
on form you can write client script to change label using g_form.setLabelOf('fieldName', 'New Label');
But nothing as such is available on list
💡 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 || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Thank you for marking my response as helpful.
If you're still facing any issues, I'd be happy to help further.
💡 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 || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @bonsai
Check Similar post:
How to change Label (Display Label) dynamically for related lists (though its old)
https://servicenowguru.com/ui-scripts-system-ui/modifying-label-form-fields-client-scripts/
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
43m ago
Hi @bonsai ,
to change the label in the related list
example
if you want to change the SLA definition label to "OLA Definition" on the incident table
create an onLoad client script like this
in this case since the the related list is on the incident table I have created the client script on the incident table
you can create the client script on your desired table
Note:Isolate script should be = False and
the user preference should be with the form for this to work
script
the fieldName is the name of the column(backend name) on the related list
and the tableOfTheField is the related list table name
function onLoad() {
var fieldName = 'sla' // add you table here
var tableOfTheFiled = 'task_sla' // related list table name
var th = document.querySelector(`th[glide_field="${tableOfTheFiled}.${fieldName}"]`);
if (th) {
var link = th.querySelector('a.column_head');
if (link) {
link.textContent = "OLA Definition"; // add you new label here
}
}
}
result
and this only works in the native UI not on the workspace
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya