- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2019 02:52 PM
Hi,
Currently I'm making a service request where I am making an approval - group activity (in the workflow) and trying to use a form field value's assignment group.
I've been attempting the following script to no success. Please see below:
var answer = [];
answer.push(current.variables.ci_name.assignment_group);
Note: ci_name is the form field value name (and pulling its value from the cmdb_ci table), and the assignment_group value is the field name on a Configuration Item form.
Any help is appreciated. Thank you
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2019 10:35 AM
Upon review of another team member's perspective, the coding I had opened the thread for is working now as expected.
Honestly I'm not 100% sure why the correct code was failing. I appreciate the alternatives listed. Those should be used if needed.
Thank you all,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2019 02:55 PM
Please use below code
var answer = [];
answer.push(current.ci_name.assignment_group);
Regards,
sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2019 03:19 PM
May need to do:
var answer = [];
answer.push(current.ci_name.assignment_group.toString());
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2019 04:02 PM
Hi there,
I assessed my log to find certain errors. I should reference the field change_control or "Approval group" (the dictionary label).
However I keep finding this error "Cannot read property "change_control" from undefined" despite the ci record having an Approval Group.
Any thoughts on where else this maybe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2019 04:23 PM
You need to refer your CI column name.
What's change_control field? Is it reference field for cmdb_ci table?
Regards,
Sachin
