Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to Bring Variable data from Change to change Task

sunil kumar11
Tera Expert

Hello All , 

I'm creating an change request using Record Producer and also creating change Tasks so here my challenge is 

in the change_task I need to update the Short description from the Variable value and I could not see variable data on change_task so how can I update the short description 

 

my variable is action_ngp with choices start,stop,restart 

so I need my short description as VM_+ choice value 

 

can you help me with script and i need to do this in workflow 

 

@shyamkumar VK 

1 ACCEPTED SOLUTION

shyamkumar VK
Kilo Patron

@sunil kumar11  ,

Write the Following code in the Runscript Activity and hope your Workflow is on change task 

table if so write below code 

 

var gr = new GlideRecord('change_request');
gr.addQuery('sys_id',current.parent);
gr.query();
while(gr.next()){
var choices = gr.variables.action_ngp.getDisplayValue();
current.short_description='VM_'+choices;
}

 

Regards,

Shyamkumar 

 

 

 

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

View solution in original post

2 REPLIES 2

shyamkumar VK
Kilo Patron

@sunil kumar11  ,

Write the Following code in the Runscript Activity and hope your Workflow is on change task 

table if so write below code 

 

var gr = new GlideRecord('change_request');
gr.addQuery('sys_id',current.parent);
gr.query();
while(gr.next()){
var choices = gr.variables.action_ngp.getDisplayValue();
current.short_description='VM_'+choices;
}

 

Regards,

Shyamkumar 

 

 

 

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

sunil kumar11
Tera Expert

@shyamkumar VK  Its working, Thanks for the prompt response 🙂