script to add the assignment group based on user location in flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 04:29 AM - edited 12-12-2023 04:31 AM
Hello Everyone,
We have a location routing table where we have records based on the locations mapped to the assignment groups
Based on that I have written scripts in flow designer to add the assignment group based on the users location. But it is not working. Can anyone help me with the script.
Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 04:32 AM
Hi @Srilakshmi7 ,
Please take a look into below thread -https://www.servicenow.com/community/developer-forum/how-to-populate-assignment-group-based-on-user-...
Please mark ✅ Correct if this resolves your issue, and also mark 👍 Helpful if you find my response valuable based on its impact.
Regards,
Astik Thombare
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 04:46 AM - edited 12-12-2023 04:50 AM
Hello @Srilakshmi7 ,
if you are working in the Flow Designer you can achieve this without scripting, you can:
- Add a Look Up Record activity to your location mapping table "x_ibmip_tktrouting_location_routing" with the correct filter conditions.
- Update the wanted record with the date from the record you got in the Look Up Record activity
Hope that this helps you!
If the provided information answers your question, please consider marking it as Helpful and Accepting the Solution so other community users can find it faster.
All the Best,
Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 05:15 AM
Hello Steve,
I have tried it but how to update the record by getting the value, as we have multiple values under the fileter condition about 96 records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 05:26 AM
Hello @Srilakshmi7 ,
can you please explain what values you want to update on the records with what values from "x_ibmip_tktrouting_location_routing". Because if the '"x_ibmip_tktrouting_location_routing" is a mapping table it should correspond to only one assignment group for that location.
When you find the assignment group for that location, what field on what record do you want to update?