How to populate assignment group on the Ritm form based on a reference variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 09:40 AM
Hi all,
So there is a field called area (u_area) on the location table. I have a variable (work_location_from) referencing location table on the catalog item.
I am trying to populate the assignment group on the Ritm form based on the location user selects on the form. And assignment group should the area of that specific location. Below is the runscript which Iam trying to execute but it doesnt work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2025 11:47 AM
I would recommend trying to do this via Assignment Rules instead of script. You can configure a different assignment rule for each work location. This will be easier to maintain in the future, and won't require you to maintain a choice list. One alternative you could do is update the u_area field to a reference that points to group, and you can use a reference qualifier to limit the options (so that way you don't see every group, but only the relevant ones).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 01:26 AM
Thank you for the reply. Even we thought of creating assignment rules but in future it will need some maintenance. Say if we create any new location for some Area, it needs to be added under the rules. So we are looking for something with less maintenance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 01:31 AM
Hi @Rini1
I agree @jcmings . An assignment rule would work well for this. As for maintenance, yes, that's manageable. The good part is that it's just a configuration, which can be done easily and won't impact anything else.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
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
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 08:15 AM
If you really wanted, you could set up the assignment rule to point to the u_area field via script so that the only update necessary is to the u_area field... but this involves scripting, slightly increases the technical debt, and makes it a little bit harder for someone to follow your work. I'd probably stick with assignment rules; the maintenance is minimal in the grand scheme of things.