The CreatorCon Call for Content is officially open! Get started here.

Populate Task number in Notification - Workflow

Saridha_L1
Tera Expert

Hi Team,

I have created a notification through workflow. There I have to populate Task number.

I have tried with ${number} ,RITM is displaying, and tried ${task.number}- I Am getting Blank value. Can anyone help me please.

Regards,

Saridha.L

21 REPLIES 21

kiruthika
Kilo Expert

Hi Saridha,



Create Run Script Activity before that Notification Activity and store the task number to scrathpad variable then use it in the notification activity.



var grNum = new GlideRecord('sc_task');


grNum.addQuery('request_item',current.sys_id);


grNum.query();


if(grNum.next()){


workflow.scratchpad.taskNumber = grNum.number;


}




Notification Activity:


${workflow.scratchpad.taskNumber}




Regards,


Kiruthika Bala


Thank you for this solution as we were having the same issue.  

Out of curiosity, how would I format this if I wanted the displayed task number to be a link to the task?

Saridha_L1
Tera Expert

Hi Kiruthika,



Thank you for your response.



I have tried the above solution. But it didnt work.



Regards,


Saridha.L


Show a screen capture of your whole workflow. Maybe you don't have a task under your RITM.


Saridha_L1
Tera Expert

Hi Rusty,



find_real_file.png




Please find the screenshot.



Regards.


Saridha.L