Skip to main content
August 26, 2022
Solved

Expression in e-mail

  • August 26, 2022
  • 4 replies
  • 0 views

Hi!

I'm working on a training project and my aim for now is to send an e-mail when a form is rejected. 

I managed to send the e-mail, but I also wanted to mention in the e-mail the ID of the rejected data. However, when I use the following expression: =pv!customerDetails.customerID

The rejected data is called "CustomerDetails" and contains a "customerID". In the process I also used a process variable - customerDetails, in which I save the CustomerDetails. I also tried to add an input variable which would have the id value inside, but I didn't manage to use it in the mail either.

Thank you, in advance!

Best answer by mikes0011

That's the correct way - can you clarify what went wrong?

Are you just saying it's blank in the resulting email?  If so: Did you check your process insstance to verify that "pv!customerDetails.customerID" actually had a value at the time the Send Email node was executed, for instance?

4 replies

mikes0011
Brainy
August 26, 2022

If you're using the default email body text creation system (i.e. the rich text editor) directly in the Send Email node, you'll need to click the control to add an "expressionable box" into your body text - then you can click the expression box icon it adds, and bring up an expression editor, and type anything you want in there (including HTML code, iirc).

The Expression Guru
August 26, 2022

That's exactly what I did. The expression =pv!customerDetails.customerID was in the expressionable box

mikes0011
mikes0011Answer
Brainy
August 26, 2022

That's the correct way - can you clarify what went wrong?

Are you just saying it's blank in the resulting email?  If so: Did you check your process insstance to verify that "pv!customerDetails.customerID" actually had a value at the time the Send Email node was executed, for instance?

The Expression Guru