- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 05:03 PM
Hi SNOW Dev,
Is it possible to assign a string value to a reference field? For example,assignment group is a reference field, and I'd like to assign "Team Acme" (String) to an assignment group field like the below.
assignment_group = "Team Acme"
I tried it but didn't work. Thank you in advance.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 08:37 PM
Hi,
Check below script.
var gr = new GlideRecord('incident');
gr.addQuery('number','INC0010111');
gr.query();
while(gr.next()){
var str_value=gr.description;
gs.print(str_value);
gr.assignment_group.setDisplayValue(str_value);
gr.update();
}
Result -
Note - Make sure your string value should be present in Group table.
Mark correct/helpful based on impact.
Thanks,
Dhananjay.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 05:14 PM
if you are using business rule then try one of the below.
current.setDisplayValue('assignment_group', 'Team Acme');
or
current.assignment_group = 'Team Acme';
Please mark this correct & helpful if it answered your question.
Thanks & Regards,
Sharjeel
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 06:04 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 06:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 05:39 PM