How to change Label (Display Label) dynamically for related lists
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2017 10:28 PM
How to change Label value (Display Label) dynamically for related lists tables based on some conditions.
e.g.,
CI Class: cmdb_ci_storage_server
Related List: cmdb_ci_storage_controllers
Condition: If cmdb_ci_storage_server.manufacturer = EMC i'd like to set/change the 'Label' for cmdb_ci_storage_controllers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2017 10:51 PM
Hi,
If I am not wrong, you want to change the label of a releated list based on the value of field in the form.
I dont think there is a way to change the related list label. You can create another related list from relationship and add it into the form. Create a onload client script and based on the field value you can show or hide your desired related list.
9.7 hideRelatedList
void hideRelatedList(listTableName)
- Hides the specified related list on the form.
- Parameters:
- listTableName - specifies the name of the related list. Use the list sys_id to hide a list through a relationship.
- Returns:
- void
9.15 showRelatedList
void showRelatedList(listTableName)
- Displays the specified related list on the form.
- Parameters:
- listTableName - specifies the name of the related list.
- Returns:
- void
- Please mark helpful/correct/like based on impact.
- Regards,
- Souren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2017 08:05 AM
Thanks for the quick reply! However, even with the new related list I can probably filter the results but don't see an option to change the label. And I believe the Label of the related list to linked to the Table definition.
Please correct me if I am wrong?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2017 09:58 PM
Did you got a chance to go through the below threads, these might be helpful for your query:
Dynamic Field Labels — ServiceNow Elite
Regards,
Shloke
Regards,
Shloke