- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2016 02:35 PM
Hi everyone,
I'm trying to add some logic to our Incident Record Producer script so that when a user submits the form through ESS with our 'Issue Type' variable set to 'Applications' and the Description contains the phrase 'onbase' to auto-assign to a particular group. Has anyone done something similar? Any help is appreciated.
Thanks,
Fred
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2016 01:22 PM
Hey Fred,
Adding this if statement to your record producer script should achieve what you're looking for.
if(current.[field "value" for issue type] == ["value" for applications] && current.["Value" for description].toLowerCase().indexOf('onbase') >=0)
{
current.assignment_group = "[sys_id of desired assignment group]";
}
if it doesn't work, try replacing "current" with "producer" and give it another go.
Good Luck,
-Ben

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2016 04:36 PM
As a final "FYI", instead of using a hard coded sys_id, use a property with the name of the default assignment group. For example, onbase.default.assignment_group = Networking
In your script, you do this:
var defaultGroupName = gs.getProperty('onbase.default.assignment_group');
current.assignment_group.setDisplayValue(defaultGroupName);
Now if you want to change the group, just change the property, not the code!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2016 10:16 PM
This is great! Thanks Chuck!
Fred
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 06:24 AM
Hi @j3d1
please can help on this query,
there is comments field on record producer, based on keyword of description, category field of incident record will be auto filled.i wrote below code, its not working.
ex: comments on record producer contains as " user not able to access data from database"
here keyword is database.so category = "Dev Apps, Packages, Platforms";