- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 12:00 PM
For your testing, just know that since you have a script that runs onChange of field 1 and depends on field 2, that field 2 must be populated before field 1. Once you get this working add an exclusion to not run if field 2 is empty, or whatever fits your use case, then create a similar script onChange of field 2 so that no matter what order the 2 fields are populated in, the script will still run.
As far as why it's not working, you'll have to add some alerts on f1 and f2 which will confirm that those field names are correct, and the value you are testing for (newValue/f1 and f2) is expected. It doesn't make sense to clearOptions then removeOptions for individual choices, so do one or the other as clearOptions will remove all options. If you take this line out, make sure 'Test' is the value of the choice record, not the label.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 11:22 AM
Hi Brad, I tried this route and it is working .Thankyou very much
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 11:29 AM
You are welcome!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 12:06 PM
Did you try the data lookup way, create a lookup table,
Match the choices and set the results.
Have a look ootb priority lookup and try once.
Regards
Dr Atul G. - Learn N Grow Together ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
******************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 09:07 PM
Hi
you can make field dependent on others
please refer below video