Select to view content in your preferred language

Step type send email does not accept expression and returns Invalid Email in To or CC

153
2
2 weeks ago
SanchezNuñez
Frequent Contributor

Good afternoon,

I tested this expression:

"GetUser($currentPortal, LastRunner($Job, "<step ID>"))['email']" 

and it works.

But when I add it to an email step in the text box To or CC it does not accept the value and shows a message "Invalid email".




 

0 Kudos
2 Replies
VenkataKondepati
Frequent Contributor

I see that you have already wrapped the arcade expression in double quotes.
According to ESRI documentation, the To/CC fields accept expressions only when inserted via the “This input supports Arcade Expressions” option; otherwise, they’re treated as plain text and flagged as invalid.

In practice, the reliable workaround is to resolve the value first (e.g., store the email in a job property) and then reference that property in the Email step.

Dynamic job properties—ArcGIS Workflow Manager | Documentation
Add and configure Send Email—ArcGIS Workflow Manager | Documentation

Regards,
Venkat
Book a meeting with me:Get on a Call
Follow me on: LinkedIn
0 Kudos
SanchezNuñez
Frequent Contributor

Found the issue. 

The expression must start and end with double quotes, and use single quotes inside the expression.
 
"GetUser($currentPortal, LastRunner($Job, '############'))['email']"


0 Kudos