How to set delay in my on change client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 02:49 AM
Below is my the small part of code that i am using in my client script, could anyone please help to know that how i can place a delay there, i mean after setting the value in "category" i want to waiit for few seconds then only i should populate the sub categor.
basicall i have code "window.setTimeout(function, 5000)" to use for delay purpose but i do not know what i need to put in place keyword "function".
g_form.setValue('category',''+cat);
g_form.setValue('subcategory', subCat);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2022 03:15 AM
Hi @VIKAS MISHRA ,
If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.
If not reply and share details.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 02:19 AM
Hi @VIKAS MISHRA ,
If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.
If not reply and share status of the issue.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar