- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 07:54 AM
HI,
I have a requirement where I want to change a field only on parent table, and not on its child table. Is there a possibility of doing so, without adding label for all the childs.
E.g. I have field named 'Used by' which is being used by all child tables (lets say X,Y,Z) of a table(B) which is again a child of table(A).
(A) - Used by
|
(B) - Used by
|
(X)(Y)(Z)- Used by
I want to change the label of field to 'Using' in table(B), and all other table should have the field label as 'Used by'.
(A) - Used by
|
(B) - Using
|
(X)(Y)(Z)- Used by
I used the label related list in field dictionary and changed for label for table (B) but it also changed the label for (X)(Y)(Z).
Is there any possibility if I can change only for table (B) without creating any extra rows in label related list for all childs.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 08:26 AM
You may want to take a look at g_form.setLabel()
This could be used from within an onLoad client script to set the field label if your table is "B". Also see g_form.getTableName().
It might look something like this:
function onLoad() {
if (g_form.getTableName() == "table_b")
g_form.setLabelOf('field_name', 'Using');
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 08:57 AM
edits made. Thanks for pointing that out. Go ahead and mark it correct. We all learned something today.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 07:57 AM
Hi,
Use can make use of dictionary override. Please refer the wiki link below it will fulfill your requirement.
Dictionary Overrides - ServiceNow Wiki
Let me know in case you need further assistance over this. Happy to assist.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 07:59 AM
FYI - Field labels are not defined in dictionary overrides. Dictionary overrides are for default values, display values, etc. The labels are in a related list on the dictionary entry (next to dictionary overrides.) They are stored in a completely different table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 08:09 AM
Hi Chuck,
That I am aware we cannot change the field labels through Dictionary override. But what I was suggesting harshvardhanjoshi can make use of dictionary override to change the display value for the field in table (B).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 08:12 AM
Thanks for the clarification, however changing the display value still has nothing to do with the labels that appear on the form. It's only effective for what is displayed in a reference field when another table is referencing records from that table. I saw nothing about reference fields in the original question posed by Harshvardhan.