- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2018 08:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2018 09:27 PM
Hi,
Yes, it will work on Load of form also. There is parameter called 'isLoading' which should be set to true. write onChange() as below
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
}
Regards,
Shweta K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2018 09:27 PM
Hi,
Yes, it will work on Load of form also. There is parameter called 'isLoading' which should be set to true. write onChange() as below
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
}
Regards,
Shweta K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2018 11:34 PM
Hi,
If you find the solution please mark it as Correct and Helpful. Also Close the thread.
Regards,
Shweta K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2018 10:14 PM
Yes, onchange client script runs on form load also.
When we open the form, it first creates the whol structure and then fills the values in it, and here the onchange client script gets triggered.
We have a boolean flag already provided by the platform to handle this : isLoading
It is must to validate whether isLoading is true or false.
if(isLoading)
return;
Else the form will give unexpected results. Run this cleint script onload only when its really required.