I'm trying to follow the instructions in Show Attachments in Pop-ups with Arcade Expressions

I want to show the first attachment in a popup in ArcGIS Online and to do that I need to obtain the first attachment ID using this Arcade expression:

return First(Attachments($feature)).ID

The error I get is this:

Execution Error:Runtime Error: Cannot call member method on null. ID

My attachments are associated with a layer that I cannot share publicly. Unlike the video there is a very long Token ID that runs after the attachments ID. Here's a small section of what I'm looking at:


How do I write an Arcade expression to obtain the first Attachment ID on a private feature layer?

1 Answer 1


Your layer needs to be made public.

  • 3
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – Machavity
    May 24, 2022 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.