<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Arcade function in Email Template not working the same as Send Email step in ArcGIS Workflow Manager Questions</title>
    <link>https://community.esri.com/t5/arcgis-workflow-manager-questions/arcade-function-in-email-template-not-working-the/m-p/1507398#M2083</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;This is what I have for 'TO' line -&lt;STRONG&gt;&amp;nbsp;"jobExtendedProperty($job, 'survey123', 'email')"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This is what I have for 'CC' line -&amp;nbsp;&lt;STRONG&gt;"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'}"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MargoHuang_0-1721413482879.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110111i30DF88D6F21B0245/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MargoHuang_0-1721413482879.png" alt="MargoHuang_0-1721413482879.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MargoHuang_4-1721413699182.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110115i187B98E709880689/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MargoHuang_4-1721413699182.png" alt="MargoHuang_4-1721413699182.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the email I got after Survey123 submission. Nothing is in the 'TO' line.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MargoHuang_3-1721413679956.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110114i0747FE1F6A708A98/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MargoHuang_3-1721413679956.png" alt="MargoHuang_3-1721413679956.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas on what is causing this? Any help is appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Margo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jul 2024 18:30:17 GMT</pubDate>
    <dc:creator>MargoHuang</dc:creator>
    <dc:date>2024-07-19T18:30:17Z</dc:date>
    <item>
      <title>Arcade function in Email Template not working the same as Send Email step</title>
      <link>https://community.esri.com/t5/arcgis-workflow-manager-questions/arcade-function-in-email-template-not-working-the/m-p/1507398#M2083</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;This is what I have for 'TO' line -&lt;STRONG&gt;&amp;nbsp;"jobExtendedProperty($job, 'survey123', 'email')"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This is what I have for 'CC' line -&amp;nbsp;&lt;STRONG&gt;"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'}"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MargoHuang_0-1721413482879.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110111i30DF88D6F21B0245/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MargoHuang_0-1721413482879.png" alt="MargoHuang_0-1721413482879.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MargoHuang_4-1721413699182.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110115i187B98E709880689/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MargoHuang_4-1721413699182.png" alt="MargoHuang_4-1721413699182.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the email I got after Survey123 submission. Nothing is in the 'TO' line.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MargoHuang_3-1721413679956.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110114i0747FE1F6A708A98/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MargoHuang_3-1721413679956.png" alt="MargoHuang_3-1721413679956.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas on what is causing this? Any help is appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Margo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 18:30:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workflow-manager-questions/arcade-function-in-email-template-not-working-the/m-p/1507398#M2083</guid>
      <dc:creator>MargoHuang</dc:creator>
      <dc:date>2024-07-19T18:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade function in Email Template not working the same as Send Email step</title>
      <link>https://community.esri.com/t5/arcgis-workflow-manager-questions/arcade-function-in-email-template-not-working-the/m-p/1539528#M2095</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;It is recommended to use Send Email step instead since Send Email step is configured specifically for a particular job template.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 15:30:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workflow-manager-questions/arcade-function-in-email-template-not-working-the/m-p/1539528#M2095</guid>
      <dc:creator>MargoHuang</dc:creator>
      <dc:date>2024-09-17T15:30:20Z</dc:date>
    </item>
  </channel>
</rss>

