- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2019 09:17 AM
I am working on the ITSM simulator for Madrid version in the Now Learning portal and am having a problem solving this.
I have gone to the "Create Emergency Change" UI action for the Incident (incident) table, but cannot figure out how to get the correct solution. I have tried a number of different things, but none have been validated in my simulator.
I would appreciate the exact answer that I should have with steps explaining your solution so I can learn from this instead of getting frustrated because I don't understand. Thank you.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2019 11:03 AM
It should be: && (current.priority == 1 || current.priority == 2)
add that to the original statement. If priority is 1 or 2 this will evaluate to true.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2021 05:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2021 11:23 AM
thank you works perfectly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2021 08:38 PM
thanks, please mark as helpful.
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2021 01:46 AM
Hey guys, anyone could paste the script in a context for non-devs 😞
(function(current, previous, gs, action) {
var target = {};
target.table = current.getTableName();
target.sysid = current.getUniqueValue();
target.field = 'rfc';
try {
target.isWorkspace = (typeof RP == 'undefined');
}
catch (err) {
target.isWorkspace = false;
}
gs.getSession().putProperty('change_link', target);
var changeRequest = ChangeRequest.newEmergency();
changeRequest.setValue("short_description", current.short_description);
changeRequest.setValue("description", current.description);
changeRequest.setValue("cmdb_ci", current.cmdb_ci);
if (changeRequest.hasValidChoice('priority', current.priority))
changeRequest.setValue("priority", current.priority);
changeRequest.setValue("sys_domain", current.sys_domain);
changeRequest.setValue("company", current.company);
changeRequest.insert();
current.setValue('state',4);
current.update();
action.setReturnURL(current);
action.setRedirectURL(changeRequest.getGlideRecord());
})(current, previous, gs, action);
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2021 05:02 AM
Ahhh...thats the reason. I had as condition "current.priority<=2..."
It has the same effect but if the simulator only checks for "current.priority == 1 || current.priority == 2..." 😉 Sure.
Thanks a lot.