Script help to set priority on RITM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2018 10:17 AM
Good morning,
I am working on a project where we need to set priority on a RITM. I have already incorporated a script step into my workflow that sets the priority, but I'm having trouble figuring out the proper script to use.
This is what I have so far:
If(current.variables.it_dev_priotity.getDisplayValue() == 'Low'){
current.priority = 3;
}
I apologize if this is incredibly bad, I'm a javascript neophyte and need all the help I can get as I learn.
Thank you in advance!
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2018 10:19 AM
I would start by looking at Data Lookup Rules. These are used for Incident tickets and setting their priority. You can essentially follow the same methodology for RITM's. However, this would apply to all RITM records.
If you want it to only apply to this single item, let's work with your script. What type of variable is "it_dev_priority"? If it's a select box, I would write it like this (assuming the choice value is just the word 'low' in lowercase as that would be best practice):
If (current.variables.it_dev_priotity.getValue() == 'low'){
current.priority = 3;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2018 12:47 PM
it_dev_priority is a multiple choice variable set. We use it across an entire category of
It could be that I'm coming at this with the wrong idea. Here's a screenshot of my workflow; my three script sections in the middle there will each pick up a level from the switch and then set the priority accordingly. In my head, anyway, that's way it should work.
Anyhow, I tried your suggestion, and even tried making current.impact and current.urgency = 1, and still the priority is not changing. I'm not sure where I'm going wrong here.