g_form.clearValue() does not work in the catalog client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 10:07 PM
HI experts,
Using a onchange client script(onchange of variable month_of_overtime) I want to clear the selected value in the selectbox type of a variable in a variable set based on the response received from the Glide Ajax call. Everything works fine as expected but, as soon as I add the statement to clear the selectbox variable it throws an error on the form.
Please look at the screens shot below.
Screenshot of error:
If I remove the clearValue statement the error message does not appear. What could be the reason for this?
Note: the Script include is returning correct value so nothing is wrong there.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 10:21 PM
Hi Kalyani,
Interchange both the lines 17,18 and try.
OR
g_form.setValue("month_of_overtime","");
Thanks,
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 10:35 PM
Hi Murthi,
I have tried that already. It does not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 10:21 PM
Hi, try clearoption as it is select box
g_form.clearOptions();
Please check and let me know if still facing the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 10:34 PM
Hi Kalyani,
clearOptions would clearall the available options. So would not work,