what is the use of isLoading, isTemplate in onChange client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2018 09:29 AM
what is the use of isLoading, isTemplate in onChange client script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2018 05:41 PM
Since an OnChange Client script can run onChange and onLoad, using isLoading will prevent it from running onLoad.
isTemplate can be used to control whether or not the client script runs after a Template is used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2018 10:34 PM
Hi Nagaraj Bhatkal,
1) isLoading - Identifies whether the changes occurs as a part of form load.Value is true if changes is due to a form load.
2) isTemplate - Identifies whether the changes occurs as part of template load. Value is true if changes is due to population from a template.
Refer this link also:-
https://developer.servicenow.com/app.do#!/lp/new_to_servicenow/app_store_learnv2_scripting_kingston_...
Let me know if you have any questions.
Please mark it Correct or Helpful, if it works based on impact....!!!!
Warm Regards,
Priyanka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2018 10:57 PM
Hi Nagaraj,
In onChange Client Script script
isLoading - it works at the time of form loading or we can say that when form opens it takes 2 seconds to 3 seconds loads all the contains properly so, at this time of loading if any changes happens at that field in which onchange client script is written it neglect that changes or it didn't consider that changes.
isTemplate - it checks whether the values populated through applied template is correct or not.
And check out below link to understand this in a better way:
https://developer.servicenow.com/app.do#!/lp/new_to_servicenow/app_store_learnv2_scripting_kingston_the_script_field?v=kingston
Warm Regards,
Aishwarya Puri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2020 12:48 AM
Excerpt from Servicenow Developer Articles:
- 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.