The CreatorCon Call for Content is officially open! Get started here.

After typing in reference field if no match is found show alert message

purbalipc
Tera Expert

Hi,

Customers in my company are pretty new to ServiceNow. So they are not sure about how each field behaves in SN.

So we want to show an alert message whenever user is done with typing in reference field and no match is found.

I am not sure how to implement this one as onChange script will not work here unless we get a valid value in the field.

4 REPLIES 4

DilipKumar DJ
Kilo Guru

Hi Purbali,



The catch here is when the system will know that the user is done with typing. Have you tried enabling the auto complete field attribute(ref_auto_completer) which might be helpful.


Hi Dilip


Auto complete is enabled. Issue is user sometime search with nicknames of a person and it doesnot show anything. So I was wonder if I can implement onMouseover or something else HTML events to get that functionality.


Gaurav Bajaj
Mega Sage

Hi Purbali,



I guess that's already part of the implementation once you are done with typing and if it doesn't find anything matching,


It shows the invalid reference error but that's only when you change the focus from that field.



find_real_file.png



I don't think any client script or any custom solution is further required.


If you really need one, then you can add a ref icon and add up a UI Macro to say that nothing found in a GlideModal popup.



Adding a UI Macro (button) to Any Field with Fuji Icons




Please mark correct/helpful based on the impact of the response.




Thanks


Gaurav


Hi Gaurav,


Requirement is you can say that showing custom invalid reference message in service portal . Currently when you type something it just shows no match found and user keeps wondering why the user is not available in the system.



find_real_file.png