- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 11:34 PM
We receive a requirement in Change Request that during creation of CR if the user select SAP-AMK in Subcategory 1 the COE must to auto-populate to SAP.
I created a BR see screenshot
When to run
Actions
When I tried it, it's not working
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 03:09 AM
to see it happen real-time you need to use 2 onChange client scripts 1 on Subcategory1 and 1 for type field
I would recommend using business rule rather than use 2 onChange scripts
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 09:40 PM
Hi @Vengeful,
Try using on change client script on SubCategory 1 :
Use Field Name as "SubCategory 1" in the above client script
Please mark my answer helpful and correct if you find it useful.
Thanks,
Kavita Bhojane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 12:35 AM
Try to uncheck the Advanced field, it adds the scripting option and perhaps it is in contradiction.
or try to set the value via script when Advanced is set to true...
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 12:36 AM
And also, now I can see that your business rule is Before, so change it to After or Async. That should help. Because Before it is evaluated it does not have the desired value from the trigger condition.
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 01:01 AM
Hi @Vengeful ,
Did you save the form ?
If that helps please mark my answer as correct / helpful!
And if further help is needed please let me know
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 02:23 AM - edited 11-10-2023 02:24 AM
@Clara Lemos
If save or submit the form it will take effec, but the requirement is during creation, if they select the Subcategory 1 to SAP-AMK to COE should be populated before submit or save the CR.