- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 09:45 AM
I have a requirement that change column label to first letter capital only. Ex: "Account Relationship", I want this to be a "Account relationship". I know change label from dictionary but I have more than one on a table.
Can please some one tell me is there any chance to write script to change automatically these field label to first letter upper case format. and where do i write that (business rule/background script).
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 09:56 AM
You can try with a background script or fix script. Below is a script you can try. I have added setLimit to limit it to 10 labels. If it works fine, you can remove it. Or add your query to limit it to a table etc.
var lb = new GlideRecord('sys_documentation');
lb.setLimit(10);
lb.query();
while (lb.next())
{
var str = lb.label;
lb.label = str.charAt(0).toUpperCase() + str.slice(1);
lb.update();
}
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 09:54 AM
Hi,
You can write one time fix script for the same.
Thanks and Regards,
Saurabh Gupta

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 09:56 AM
You can try with a background script or fix script. Below is a script you can try. I have added setLimit to limit it to 10 labels. If it works fine, you can remove it. Or add your query to limit it to a table etc.
var lb = new GlideRecord('sys_documentation');
lb.setLimit(10);
lb.query();
while (lb.next())
{
var str = lb.label;
lb.label = str.charAt(0).toUpperCase() + str.slice(1);
lb.update();
}
Please mark this response as correct or helpful if it assisted you with your question.