Workflow Activity - Task Assignment Based on a variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2024 08:09 AM
I have created a catalog item that will have two tasks. The first task will be assigned to one of the 20 users based on the variable the end-user chose from a drop-down list of the existing emails.
How Can I link the Catalog Task (Assigned To) to the same as the variable end-user selected? I've attached a screenshot.
Regards,
Burhan Shah
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2024 08:13 AM
Hi @Burhan Shah ,
Please refer below thread:
Plz mark my solution as Accept, If you find it helpful.
Thanks & Regards,
Sumanth meda

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2024 08:16 AM
Hi there,
Within the advanced script of your task you can apply something like:
task.assigned_to = current.variables.your_variable;
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 12:43 AM
Hi Mark,
I tried and it still didn't populate 😔 Let me know if I am doing something wrong here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 02:18 AM
Hi @Burhan Shah,
Please note that this script is running after values are set. Try to populate your Assigned to field from Populate task variables section. Check out the following question and its solution.
If you found my reply useful, please mark it as solution and helpful. It will benefit me and the community.
Thanks and Regards,
Ehab