- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 04:19 AM
Hi All,
I need to add an info message at the top of a custom table's list view.
Please assist.
Thanks & Regards.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 04:30 AM
Hi @Joshuu
You can achieve this using the before query BR.
Sample:
I took change_request table as an example. So, i've used change_request_list. Update the table name as per your requirement.
(function executeRule(current, previous /*null when async*/) {
var validate = gs.action.getGlideURI().toString().indexOf('change_request_list'); // Custom table name with the suffix "_list"
if(validate>-1){
gs.addInfoMessage("Change request list view");
}
})(current, previous);
Hope this helps.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 04:30 AM
Hi @Joshuu
You can achieve this using the before query BR.
Sample:
I took change_request table as an example. So, i've used change_request_list. Update the table name as per your requirement.
(function executeRule(current, previous /*null when async*/) {
var validate = gs.action.getGlideURI().toString().indexOf('change_request_list'); // Custom table name with the suffix "_list"
if(validate>-1){
gs.addInfoMessage("Change request list view");
}
})(current, previous);
Hope this helps.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 05:12 AM
Hi,
Create new UI script
function addInfoMessage() {
var message = "This is an informational message for the custom table list view.";
var infoContainer = document.createElement('div');
infoContainer.className = 'info-message';
infoContainer.innerHTML = message;
document.querySelector('.list_header').insertAdjacentElement('beforebegin', infoContainer);
}addInfoMessage();
Thanks, and Regards,
Suyash