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

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!

I only need the business justification. I am using Workflow Editor for this.

@Merza Lyn , 

Please refer the first link from previous post it has explained in workflow with screenshots,  and add only those variable you want to copy.

 

Thanks,
Bhimashankar H

Ankur Bawiskar
Tera Patron
Tera Patron

@Merza Lyn 

this line should work in advanced script in "Catalog Task" activity in workflow

Did you check by adding log what value came?

are you giving correct variable name?

gs.info('variable value is' + current.variables.business_justification);
task.description = current.variables.business_justification;

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