Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

When field type is reference and when the value is empty i need to populate error message on portal

NARESHM47592801
Tera Contributor

There is a Function field that references the Position table. When the Who is the Manager field (reference to the User table) is selected, the Function field is automatically populated based on the manager’s direct reports.

My requirement is to display an error message if the Function field remains empty after selecting the manager.

  • I tried implementing this using an onChange Client Script, but it did not work because when there is no matching Function, the reference field remains empty, and I cannot change or set a value in the Function field when it is empty.
1 REPLY 1

Kieran Anson
Kilo Patron

Hi,

How are you setting the function field. Is this via onChange client script or other means? Is this on a catalog item or other means?

 

Can you share the client script that you've attempted to use without success?