Select to view content in your preferred language

Arcade function in Email Template not working the same as Send Email step

220
1
Jump to solution
07-19-2024 11:30 AM
MargoHuang
Occasional Contributor

Hi all,

I am trying to use Arcade expressions in Email Templates for 'TO' and 'CC', but the Arcade expressions are not returning any values, although the same expressions work as expected when used in Send Email step.

This is what I have for 'TO' line - "jobExtendedProperty($job, 'survey123', 'email')"

This is what I have for 'CC' line - "if(jobExtendedProperty($job, 'survey123', 'category_1')=='Map Request (GIS Unit)'){return 'margo.huang@domain.com'} else if (jobExtendedProperty($job, 'survey123', 'category_1')=='ERV Issue (GIS Unit)'){return 'margo.huang@domain.com'}"

When I do 'preview email', both lines return desired email addresses. However, after I submit a test Survey123 form, no email is sent to me. 

MargoHuang_0-1721413482879.png

I tried putting my email address under 'CC' line as static value while keeping the arcade function in the 'TO' line(which is supposed to return my email address).

MargoHuang_4-1721413699182.png

 

This is the email I got after Survey123 submission. Nothing is in the 'TO' line.

MargoHuang_3-1721413679956.png

Does anyone have any ideas on what is causing this? Any help is appreciated! 

Thanks!

Margo

 

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
MargoHuang
Occasional Contributor

It is confirmed by ESRI staff that Email Template doesn't read extended property tables well. Email Templates are intended for simple messages since it applies to all job templates.

It is recommended to use Send Email step instead since Send Email step is configured specifically for a particular job template. 

View solution in original post

0 Kudos
1 Reply
MargoHuang
Occasional Contributor

It is confirmed by ESRI staff that Email Template doesn't read extended property tables well. Email Templates are intended for simple messages since it applies to all job templates.

It is recommended to use Send Email step instead since Send Email step is configured specifically for a particular job template. 

0 Kudos