OnChange Client Script to Clear Form when "Select tool" value is changed Not Working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2018 01:56 PM
For some reason the form does not clear the values when I move from one value to another value under "Select Tools" - it only works when i clear that value.
For example, if i go to choice 1 to choice 2 - some of my UI policies do not work and then the values do not clear.
If i click x and clear the "select tools" field - then select choice 1 -- it works.
Has anyone had this type of issue before?
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2018 01:59 PM
See if this helps
https://hi.service-now.com/kb_view.do?sysparm_article=KB0647496
And also try to replace g_form.clearValue() to g_form.setValue('variablename','');
Please mark my response as correct and helpful if it helped solved your question.
-Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2018 02:02 PM
I've used 'clearValue' successfully in the catalog and service portal. There shouldn't be any problem with your script from what I can see. If you're experiencing problems, it's likely due to a conflict with another script or UI policy. I would start by disabling those and testing this script to see if it works on its own. Then you can re-enable each one in turn to try and isolate the one with the issue. You can also check your browser console for javascript errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2018 07:36 PM
do you know what would be an example that conflicts with each other?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2018 02:07 PM
Have you tried modifying the order of the script?