Copy variables to the catalog task description

Merza Lyn
Mega Guru

I have a requirement to copy the value of the variables business_justification to the catalog task description.

MerzaLyn_0-1756704960485.png

 

I tried these to the Workflow Catalog task activity, but non of these are working.

var justification = current.variables.business_justification;
   // Copy it to the Task description
   if (justification) {
       task.description = justification;
}

 

task.description = current.variables.business_justification

 

var justification = current.variables.business_justification
task.description = justification;

 

1 ACCEPTED SOLUTION

Bhimashankar H
Mega Sage

Hi @Merza Lyn ,

 

To copy the catalog variable business_justification to the description field of the catalog task use a Business Rule or Flow Designer action.

 

Using FD:

  • Use the "Get Catalog Variables" action for RITM in Flow Designer.

  • Map the output variable business_justification to the task’s description during the Catalog Task creation step

 

Please go through below post it shows from both Flow designer and BR

Copy variables to description 

Copy Variables by BR 

 

Thanks,
Bhimashankar H

 

-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!

View solution in original post

6 REPLIES 6

@Merza Lyn 

I could see you marked the question as answered so it's good to know what was the issue.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Rafael Batistot
Kilo Patron

Hi @Merza Lyn 

 

Could you try 

 


var justification = current.variables.business_justification;

if (justification) {

task.description = justification.getDisplayValue(); // or .toString()
}