Does anyone know of a way to choose which attachment shows first in the Attachment Viewer Instant App? I can't find any settings to choose how to sort the attachments if there are multiple attachments in a feature. I'm wanting an image to show first instead of other documents such as PDFs that are attached. I'm assuming this could be done via the webmap also but can't find any way to sort the attachments in a feature there either.
Solved! Go to Solution.
You can do this in the web map's popup using Arcade.
1. Add an image to the popup (+ Add content)
2. Next to URL, choose the curly brackets { }
3. Click + Add expression at the bottom
4. Apply the script below
Two potential solutions that come to mind (I haven't tested them, but they might be worth a try!)
1. Open your feature layer with attachments in AGOL Map Viewer and configure the pop-ups.
2. Use HTML/Arcade expressions within your pop-up to sort the attachments by file type.
If you haven't come across this link, it could be helpful - Pop-ups Essentials
You can do this in the web map's popup using Arcade.
1. Add an image to the popup (+ Add content)
2. Next to URL, choose the curly brackets { }
3. Click + Add expression at the bottom
4. Apply the script below