Purpose of isLoading and isTemplate parameters in onChange ClientScript.

smrithi4
Kilo Contributor
1 ACCEPTED SOLUTION

Prateek kumar
Mega Sage

Check below article.

https://developer.servicenow.com/app.do#!/training/article/app_store_learnv2_scripting_london_client...

The onChange function is automatically passed five parameters by ServiceNow. Although you do not need to do anything to pass the parameters, you can use them in your script.

  • control: field the Client Script is configured for.
  • oldValue: value of the field when the form loaded and prior to the change.
  • newValue: value of the field after the change.
  • isLoading: boolean value indicating whether the change is occurring as part of a form load. Value is true if change is due to a form load. When forms load, all the field values on the form change as the record is loaded into the form.
  • isTemplate: boolean value indicating whether the change occurred due to population of the field by a template. Value is true if change is due to population from a template.

Please mark my response as correct and helpful if it helped solved your question.
-Thanks

View solution in original post

2 REPLIES 2

Prateek kumar
Mega Sage

Check below article.

https://developer.servicenow.com/app.do#!/training/article/app_store_learnv2_scripting_london_client...

The onChange function is automatically passed five parameters by ServiceNow. Although you do not need to do anything to pass the parameters, you can use them in your script.

  • control: field the Client Script is configured for.
  • oldValue: value of the field when the form loaded and prior to the change.
  • newValue: value of the field after the change.
  • isLoading: boolean value indicating whether the change is occurring as part of a form load. Value is true if change is due to a form load. When forms load, all the field values on the form change as the record is loaded into the form.
  • isTemplate: boolean value indicating whether the change occurred due to population of the field by a template. Value is true if change is due to population from a template.

Please mark my response as correct and helpful if it helped solved your question.
-Thanks

thank you