In OnLoad Client script, why fieldname is showing as mandatory?

Sathwik1
Tera Expert

In OnLoad Client script, why fieldname is showing as mandatory? is it expected?

Sathwik1_0-1769669824261.png

@Ankur Bawiskar 

 

1 ACCEPTED SOLUTION

@Dr Atul G- LNG 

FYI

-> onLoad runs when form loads and has no dependency with Field name, hence it doesn't require Field name in it

-> Field name makes logical only when the type = onChange

-> I checked in my PDI and when I created onLoad client script Field name is not shown on form

So this is not OOTB behavior

See below @Sathwik1 for your reference

 

onload onchange behavior.gif

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

8 REPLIES 8

@Dr Atul G- LNG 

Thanks for editing your comment !

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron

@Sathwik1 

nope, seems something is wrong and is customized in your instance

For type onChange it will show Field name, for type onLoad it will hide it

Field name won't show for onLoad

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Sathwik1 

Hope you are doing good.

Did my reply answer your question?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

nayanmule
Kilo Sage

@Sathwik1  , no . Fieldname is Visible and mandatory for OnChange Client Scripts. 

Reload the page and try one more time. If the issue still exists, you may consider reaching out to Servicenow by raising a HI case.

 

Regards,

Nayan