Copy First Additional Comment from RITM and populate on description of Catalog task

martin63
Tera Contributor

Hello All,

I need functionality to copy First additional comment  from Requested item and want to populate that in description of catalog task. I have created flow in flow designer and want to copy First additional comment  from Requested item and want to populate that in description of catalog task through script in data pill..

I have tried but it is getting current:

**Access Flow/Action data using the fd_data object. Script must return a value.
**example: var shortDesc = fd_data.trigger.current.short_description;
**return shortDesc;
*/


var additionalcomment = fd_data.trigger.current.additional_comment;
return additionalcomment;
 
 
Any solution please help!!!
9 REPLIES 9

It should be

var comments = fd_data.trigger.request_item.comments.getJournalEntry(1).match(/\n.*/gm).join("\n");
return comments;
Regards
Harish

Working fine for me with this. Refer attachment

var comments = fd_data.trigger.request_item.comments.getJournalEntry(1).match(/\n.*/gm).join("\n");
return comments;
Regards
Harish

I have coded same but additional comment 1st  I am populating tis email which is coming in one line and then another and want to populate that email same in description.

can you attach screenshot? where are you getting email form? in this case you need to concatenate both email and comments to description

Regards
Harish

find_real_file.pngHi thas the inbound email created when that is triggered it is in additional comment