How to change 'No matches found' message for a reference field

Madhura5
Tera Contributor

Hi All,

On a catalog item we have a reference field  'System Name'  and it references the records from CMDB table. When someone types in reference field it shows the list of matching records. If no record found then it shows 'No matches found'.

find_real_file.png

Can we modify the message 'No matches found' to 'Please ensure you are typing the correct system name'

1 ACCEPTED SOLUTION

The SN Nerd
Giga Sage
Giga Sage

If this is in Service Portal, the only way I could think to do this would be to override the anguler directive for Reference Fields. This would apply to all reference fields! The message might be buried somewhere in there.

https://blog.tgxn.net/overriding-a-servicenow-angular-directive/

In short, there is no quick way to do this, I don't beleive it is possible to apply this to a single field (without some serious DOM manipulation), probably not worth the effort.

Just go with the line "The (insert version here) of the ServiceNow platform does not provide a mechanism to configure this message. It may be possible via customization, however this would need to be investigated further and would likely require the creation of code, which would need to be maintained and supported going forwards. If you like I can raise an enhancement request and it may be included in future versions".


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

View solution in original post

9 REPLIES 9

Yes, it is definitely a much better solution than my directive proposal.

I don't think the customer would accept this change, the message "Please ensure you are typing the correct system name" for every reference field would not make sense and cause confusion with end-users. Imagine getting that message when trying to enter a user name or a location - it just doesn't make sense.


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Yes that's true, they need to come up with a generalized message here.

Omkar Mone
Mega Sage

Hi 

Create a new Message in sys_ui_message table of ServiceNow something like this - 

find_real_file.png

This will change your message,it is tested and works as expected.

Hope this helps.

Regards

Omkar Mone

Beware: This will change the message for all reference fields, and the message won't make sense in any other context.

Neat solution though.


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Hi Madhura,

 

If my response helped you, could you mark correct answer to close this thread? This might be useful for someone else in future. 

 

Cheers 🙂