- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I have a requirement to copy the value of the variables business_justification to the catalog task description.
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;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
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
Thanks,
Bhimashankar H
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
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
Thanks,
Bhimashankar H
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I only need the business justification. I am using Workflow Editor for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader