1. Interface upload image
2. second interface use document viewer to display image. Pulling image by document ID
a!documentViewerField( label: "Laboratory test results image", document: ri!svcRequest.lab_images, altText: "5 Digital Transformation Predictions for 2018 and Beyond", height: "MEDIUM")
3. What I need is to pull the same image and display in an email. How would I go able doing so? What I am seeing is that is may not be possible.
Discussion posts and replies are publicly visible
I'm pretty sure I've posted a solution for this exact use case in a past comment. It might take some tricky searching to find, but you should be able to find it. It will have nothing to do with "document viewer field", since that component is relevant only to in-Appian interfaces. The email solution relies purely on HTML.
If you want an email to contain an image then you need to add the relevant HTML tag which usually points at a server where the image is hosted. The email application, when it loads the email, parses the HTML and fetches the document from said server.
So in your Appian solution if you're uploading a document you need to push it to the server that will host it and get a "handle" to it that you can then embed in the email's HTML.
=a!documentViewerField(pv!svcRequest.lab_images)I tried this by passing in ### image ### in email template I got this response
[@attributes=, contents=[@attributes=, disabled=, documentUrl=https://cdernexusdev.static.fda.gov/suite/rest/a/content/latest/docview/jA0ECQMCV4K8lBQbEMIB0n0B_AmlOwvFSndODlPVPg6vqEQTqU8fE6L5yrVlWLJDHAQrfh-q21WHJtVXWuMaB4Nk8oYlRro0pV3fI40lDu9kH2wezuHWuTm3tFW4tV33kFxP9_MMr4W_5Sa90jecdhvTz1zp2WCVzzcdfb9ZzAZ6OvAHdR7EbOuFb5xVbw, documentId=612916, height=, altText=, validDomain=true, actions=], label=, labelPosition=, instructions=, instructionsPosition=ABOVE, helpTooltip=, requiredStyle=, skinName=, actions=, marginBelow=, accessibilityText=, marginAbove=, helpTooltipPosition=]
So I tried wraping it with <img> tag and change code to =a!documentViewerField( document: pv!svcRequest.lab_images)but got a black response in the email What would you recommend?
You cannot use Appian UI components in email. You need to use pure HTML code.
What would I pass in for the src of the image that would allow it to grab uploaded document?
community.appian.com/.../98445
Stewart Burchell said:points at a server where the image is hosted
This is not all the way true. It is possible and relatively simple to use HTML to embed an image that the email contains as an attachment. This solution has been posted here before probably several different times. I'm about to search it out and link it.
Edit: thanks Stefan, here's at least one of the old threads. Linking directly to my comment where I posted the exact HTML and instructions.
Unknown said:community.appian.com/.../98445
Correct thread, though I would link to this comment instead