How to set priority of RITM based on the urgency from RITM form?

swathigangadhar
Tera Expert

How to set priority of RITM based on the urgency from RITM form?

9 REPLIES 9

Community Alums
Not applicable

You can use a script in your workflow to set priority coming through urgency variable -



current. priority = current.variables.variable name ;



Regards, Bharat


harshinielath
Tera Expert

Create a catalog client script that does the required task


var g=new Glide Record('sc_req_item');


// query the table with any form element


g.query();


while(g.next()){


if(current.variables.urgency=='very urgent')


g.priority=high;


else


...


}


It can be something like this according to your form and variables.


I can help you with correct scripts if it doesn't work and if you can give more details.


Am having urgency in a variable set, how to fetch that?


It works with current.varaibles.variable_name else try with current.variableset_name.variable_name


vinothkumar
Tera Guru

Hi Swathi,



As suggested by others, please use the code in the advanced section of the workflow and use Run script activity in the workflow.



If(current.variable.urgency == '2') //Give the urgency value.


{


current.priority = value of priority;



}