- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2020 02:06 AM
Hi Team,
I have a requirement that Based on Requester's last name starting Alphabet i Need to assign the catalog task to Specific Assignment Group (they have given 3 Assigment Groups)
Condition :
(if lastname (A-I or N) ASSIGMENT GROUP 1)
(if lastname (J-Q or R ASSIGNMENT GROUP 2)
(if lastname (S-Z ASSIGNMENT GROUP 3)
This script is wirking fine in Workflow but its not working in Flow designer
In Flow designer it's showing undefined input 'assignment_group' error
How can i implement this below script in Flow designer.
var lastname=current.request.requested_for.last_name;
var split_lastname=lastname.substr(0,1);
if(split_lastname.toLowerCase()=='a'||'b'||'c'||'d'||'e'||'f'||'g'||'h'||'i'||'n')
{
task.assignment_group='802cb4b3db069850e783f3671d961969';//Assignment grp 1
}
else if(split_lastname.toLowerCase()=='j'||'k'||'l'||'m'||'o'||'p'||'q'||'r')
{
task.assignment_group='b14c7877db069850e783f3671d9619f0';//Assignment grp 2
}
else if(split_lastname.toLowerCase()=='s'||'t'||'u'||'v'||'w'||'x'||'y'||'z')
{
task.assignment_group='875cf4f3db069850e783f3671d96193c';//Assignment Group 3
}
Thanks in Advance
Balaraju
Solved! Go to Solution.
- Labels:
-
Customer Service Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2020 03:03 AM
HI,
Couple of improvements to script.
For example:
var lastname=current.request.requested_for.last_name; Replace it with
var lastname=fd_data.trigger.current.request.requested_for.last_name;
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2020 08:41 AM
Can you share the updated script so that it would be helpful to others as well
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2020 08:12 AM
Hope you are doing good.
Did you got a chance to check on the solution provided to resolve your query?
If your query is resolved please mark appropriate answer as correct and helpful & close the thread.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader