Change value of variable in active RITM and task

Little
Kilo Expert

Hi All,

Suppose i have an active RITM and its 4 tasks. I have a reference field which is auto-populated based on user selected in  requested for field. Suppose my Requested For = John and his Location is getting auto-populated once his name is selected over form.

While raising request he changed the location to some wrong location unintentionally and submitted request.

Now that Location variable over RITM and task form has wrong value and needs to be fixed. RITM variable is editable but task variable is no non-editable. To fix the location value how shall i proceed?

1)Manually change value over RITM and then write a fix script for task variable.

2)Export xml of both RITM and task and then change value in XML and then import back. Will it affect anything? like my RITM and tasks are active and ya 2 tasks are closed completed as well.

What is the best practice to do this? 

1 ACCEPTED SOLUTION

Hi, Then you can change that on Task and it will propogate or show same value of that variable on RITM. Or else write a background script to change the variables on RITM. Var gr = new GlideRecord('sc_req_item'); gr.addQuery('sys_id','putsysidofritmhere'); gr.query(); if(gr.next()){ gr.variables.variablename = whatvalueyouhavetoupdate; gr.update(); } Thanks, Ashutosh

View solution in original post

3 REPLIES 3

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,

Variables are mapped with RITM only. So if you change that variable on RITM and if it is visible on task then it will change automatically.

Thanks,
Ashutosh

Hi Ashutosh,

What if my variable is in read-only state over RITM?

 

Hi, Then you can change that on Task and it will propogate or show same value of that variable on RITM. Or else write a background script to change the variables on RITM. Var gr = new GlideRecord('sc_req_item'); gr.addQuery('sys_id','putsysidofritmhere'); gr.query(); if(gr.next()){ gr.variables.variablename = whatvalueyouhavetoupdate; gr.update(); } Thanks, Ashutosh