- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2016 03:45 AM
Hello,
I'm currently creating a record producer(which creates an incident) and I'm trying to configure an assignment group based on a variable.
The variable name is able_log and has two values, YES and NO.
If the user chooses NO, the incident must be assigned to a group named "Network"
If the user chooses YES, the incident must be assigned to a group named "Service Desk"
Currently, all incidents created from this record producer are assigned to the group "Network" because the variable item on the form is mapped to cmdb_ci field on the incident and that item has the default assignment group as Network, regardless of the value set in able_log
My current script looks like this and it's not working:
if (current.variables.able_log == 'Yes')
current.assignment_group.setDisplayValue('Service Desk');
else if (current.variables.able_log == 'No'){
current.assignment_group.setDisplayValue('Network);
}
Any ideas would be much appreciated!
Thanks.
Alex
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2016 03:50 AM
Hi ,
Update the script like below in record producer script
if (producer.able_log == 'Yes')
current.assignment_group='sys_id of assignment group';
else if (producer.able_log == 'No'){
current.assignment_group='sys_id of assignment group;
}
Let me know if you need any help !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2016 03:50 AM
Hi ,
Update the script like below in record producer script
if (producer.able_log == 'Yes')
current.assignment_group='sys_id of assignment group';
else if (producer.able_log == 'No'){
current.assignment_group='sys_id of assignment group;
}
Let me know if you need any help !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2016 03:55 AM
Thanks Ravi, it's working !
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2016 02:05 AM
Hi Ravi
Best practices says not to use hard coded sys-id. Also current.assignment_group.setDisplayValue('group_name'); is working. Do we face any issues if this method is used?
Thanks,
Bhargava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2016 03:56 AM
Hi,
Please try with below code.
if (current.able_log == 'Yes')
current.assignment_group = sys_id of service Desk;
else if (current.variables.able_log == 'No'){
current.assignment_group = sys_id of 'Network';
}