Workflow notification. How to use variables from script to email body?

Elena7
Tera Expert

Hello,

 

We got a workflow (table = sc_req_item) with a notification activity in it.

From the script of this Notification activity, i need to Gliderecord to the approvals table to get 2 values from 2 fields.

 

My question is, how to use values from script to the message of the Notification ?

 

I tried below with the reqBy variable but nothing appear.

 

Elena7_2-1686844134218.png

 

 

Elena7_1-1686843889020.png

 

Result 

Elena7_3-1686844220134.png

 

Thanks,

 

 

1 ACCEPTED SOLUTION

Have you tried the following:

 

${workflow.scratchpad.positionTest}

 

 

I know you could create a new notification in the system and pass the scratchpad in the parm fields in the EventQueue to send the data within the email, but try the above first.

 


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

View solution in original post

6 REPLIES 6

ricker
Tera Guru

@Elena7,

I don't know what that script you have is...You need to use a mail script.  Run the script where you have ${reqBy} template.print the output of the mail script will be the string (text) you want.  Using the ${} only works for fields on the table or variables defined by the catalog item.

bhavishapadia
Kilo Sage

Hi @Elena7 

 

I created a very basic form and tried to shoot notification from flow. 

Do the below :

 

(1)In the Advanced script user workflow.scratchpad

  example : I used workflow.scratchpad.requestor} = current.variables.requestor ; (Use whatever value you want to enter).

 (2)In the message use the workflow variable as

    example : Requestor : ${workflow.scratchpad.requestor}.

 

I am attaching screenshot of form, flow and script