How to copy the variable value from req to sctask field ( description ) using WF

nameisnani
Mega Sage

Hi Team , 

 

How to copy the variable value ( string field : free text ) from req to sctask field ( description ) using WF .

 

can anyone please help us her e

 

Thanks in advnce 

 

1 ACCEPTED SOLUTION

chaudharymahesh
Mega Sage

can you try task.description = current.variables.short_description_2

View solution in original post

4 REPLIES 4

Suyog Aptikar
Giga Guru

@nameisnani  what have you tried so far?
I think using script it can be done, can you please provide more detail of the issue you are facing while trying to achieve this.

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.



Best regards

Suyog

Hi @Suyog Aptikar  

 

 

nameisnani_2-1698057559484.png

 

 

nameisnani_3-1698057651496.png

 

nameisnani_4-1698057716750.png

 

 

I want requested item short description value to be update in SCTASK description field . 

 

Hi @nameisnani 

 

What you have done is correct...just update the line in sc-task activity's script.

use "current.variables.<variable_name>" 

 

task.description = current.variables.short_description_2;  // as this is variable & not field on form

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

chaudharymahesh
Mega Sage

can you try task.description = current.variables.short_description_2