Hi All,
ArcGIS enterprise version: 10.9.1
We are using ArcGIS Workflow Manager Server (service-driven) and we have created a simple workflow diagram to send email using "Send Email" step. Created Arcade expressions in 'Subject' and 'Body'.
After completion of the job execution, we have received email as follows.
Same Arcade expression is working fine in 'subject' but not working in 'body' of the email.
Appreciate any help. Thanks.
Regards,
Sirish
Solved! Go to Solution.
@Hi @sirishb
Your issue is that you have text that is not encapsulated with single quotes. All text besides Arcade expressions has to be encapsulated in single quotes. I noticed it's missing at the beginning and end of your body text. See my example below.
@Hi @sirishb
Your issue is that you have text that is not encapsulated with single quotes. All text besides Arcade expressions has to be encapsulated in single quotes. I noticed it's missing at the beginning and end of your body text. See my example below.
@JFarmer ....Thank you very much
I'm also having a syntax issue with an email template. I saw the Environmental Review Workflow demo that @TiffanyWeintraub presented and liked how the link to the job was included in the email body. When I configure the text body and preview the email using a JobID, it looks good, but after I save it, the formatting is changed and the content no longer works. Does appending the jobID to a URL not work using Arcade?
Preview:
'<h3>A new project has been submitted for review.</h3>
Contact Name: ' + jobExtendedProperty($job, 'projectdetails', 'primarycontact') +
'<br/>
Phone: ' + jobExtendedProperty($job, 'projectdetails', 'phone') +
'<br />Location: ' + jobExtendedProperty($job, 'projectdetails', 'address') +
'<br />Project details: ' + jobExtendedProperty($job, 'projectdetails', 'details') +
'<br /> Please visit <a href="https://orgportal/portal/apps/workflowmanager/workflowid/workq=' + jobName($job) +'">website</a> to review the project.'
Email (after saving):
'<h3>A new project has been submitted for review.</h3>
Contact Name: ' + jobExtendedProperty($job, 'projectdetails', 'primarycontact') +
'<br/>
Phone: ' + jobExtendedProperty($job, 'projectdetails', 'phone') +
'<br />Location: ' + jobExtendedProperty($job, 'projectdetails', 'address') +
'<br />Project details: ' + jobExtendedProperty($job, 'projectdetails', 'details') +
'<br /> Please visit <a href="https://orgportal/portal/apps/workflowmanager/workflowid/workq='%20+%20jobName%28$job%29%20+'">website</a> to review the project.'
***Update***
I was able to create the desired URL with the jobName appended to the end of a text string. However, I did not use the <a></a> tags. Rather, I just constructed the URL using text and the jobName($job) dynamic job properties. Outlook will recognize the text as a hyperlink. The Email app on Android does not recognize the text as a clickable hyperlink, but it does on the mobile Outlook app. I don't have an Apple device to test, but depending on the use case, this might be sufficient for users.