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

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

Hi Paul,

 

You should try the solution i have provided 🙂

I actually checked the message table and it didn't occur to me that creating a new one would work for this. I think your solution is neat!

The only problem I see is that he wants this to apply to this field only. Your solution will apply to all reference fields, and in context won't make sense.

I'd still stand by doing nothing as the best solution.

Maybe a Client Script could be used to show a message on the field with the actual message required.

 


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

Hi 

Yes this is going to change the message for all reference field in the instance. Well this is the solution that doesn't need any high level customization. Going in the angular code for that and changing the widget would be an headache to change just a message. So i think the customers would be aware of this and the global change would be accepted and not just for one catalog item's reference field. 

 

Cheers.