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 02:08 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2018 02:10 PM
I'd modify my reply but apparently all mine have to be moderated before they'll show. You have an unnecessary "or" next to the 'newValue'. Try removing that "or" and if that doesn't work, change the order numbering so that it's the last onChange to run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2018 11:59 AM
I tried your suggestion but it still does not work 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2018 02:31 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2018 02:46 AM
One important thing to note: since the Jakarta release, catalog client scripts don't work in the Service Portal correctly on the UI Type "Desktop" as that's a deprecated option. You need to select either Mobile / Service Portal or All in the list.
More info on this here:
https://hi.service-now.com/kb_view.do?sysparm_article=KB0693343
and here:
https://docs.servicenow.com/bundle/jakarta-servicenow-platform/page/build/service-portal/concept/unsupported_client_scripts.html
So I suspect even though the script is correct, it's not playing ball when you're attempting to try it in the Service Portal.