- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2019 04:38 PM
As the title says, I'm looking to set the Assignment Group of an Incident (record producer) from a select box variable that has two options.
Select Box is checked to Map to Field the assignment group and that doesn't work.
Ive also tried current.assignment_group = producer.assignment_group.setDisplayValue();
and
var HD = producer.assignment_group.getDisplayValue();
current.assignment_group = HD.string();
t seems to know the value correctly but doesn't want to set the Assignment Group.
Any Ideas?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2019 09:09 PM
Hi,
You should be using setDisplayValue(). Can you try the following and see if it works
current.assignment_group.setDisplayValue(producer.assignment_group);
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2019 05:11 PM
try putting gs.addInfoMessage and check if there producer.assignment_group.getDisplayValue() returns a value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2019 05:19 PM
I think you should be setting the value (Not label) of choice group field as sys_id of the assignment group
and then use current.assignment_group = producer.assignment_group
or
use if condition as you have only 2 assignment group options.
something like below
if (producer.assignment_group == "A")
current.assignment_group = {Sys_ID of group A}
if (producer.assignment_group == "B")
current.assignment_group = {Sys_ID of group B}
This should work for you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2019 09:09 PM
Hi,
You should be using setDisplayValue(). Can you try the following and see if it works
current.assignment_group.setDisplayValue(producer.assignment_group);
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2019 07:26 AM
We got a winner!
Thanks. I wasn't even thinking about setting it from current only the producer side.