On change client script not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi All,
I have 2 fields on form 'Field 1' and 'Field 2'. based on these two fields I am adding option to 'Field 3'.
If 'Field 1' is selected showing option 'abc' in Field 3 drop down with currently available choices. And if 'Field 2' selected showing 'xyz'. For this created 2 on change client script for 'Field 1' an 'Field 2' separately
which is working fine.
Now the issue is, if I am changing any field other than 'Field 1' and 'Field 2' both 'abc' and 'xyz' become visible in 'Field 3' dropdown.
Please let me know is the any way with which I can control this. Thank you in Advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
that's because some other client script is setting Field 1 or Field 2 and hence Field 3 options are getting manipulated
identify that script
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hope you are doing good.
Did my reply answer your question?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Thank you for your response
The scripts I created are on Field 1 and Field 2 on change.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
is your Field 4 client script setting any value on Field 1 or Field 2?
if yes then that will trigger respective onchange client scripts and choices will get impacted.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
