how to change field label and name through business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2021 08:31 AM
Hi all,
I want to change the field name and label through business rule.
Thanks in advance
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2021 08:41 AM
Business Rules are scripts that run on the insertion of a record into the database. To manipulate the page UI you're gonna need a client script.
Is this a field label on the classic UI / workspace / service catalog. Can you provide an image of what you're wanting to change? Is this a permanent change or based on a condition when the form is loaded?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2021 08:46 AM
Hi,
Why do you want to change field name?
After creation of field, you cannot change the field name on table.
If I have answered your question, please mark my response as correct and/or helpful.
Thanks,
Suseela P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2021 08:48 AM
You can't change the name.
You can change the label using a script similar to this:
changeRecord("task", "short_description", "New Short Description Label");
function changeRecord(tableName, fieldName, newLabel){
var gr = new GlideRecord("sys_dictionary");
gr.addQuery('table',tableName);
gr.addQuery('element',fieldName);
gr.query();
while(gr.next()){
gr.setValue('column_label',newLabel);
gr.update();
}
}
As Kieran says above, this doesn't seem like a logical thing to do. If you can explain the outcome you're looking for, rather than asking for a solution, the community may be able to advise you better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2021 09:01 AM
thanks for the reply. let me modify, I want to change the label field in a incident once i submit the record.