There's actually a separate function for working with attachments. Have you attempted to use that?
https://developers.arcgis.com/arcade/function-reference/data_functions/#attachments
Even though the attachments are technically a related table, I don't think the application treats it as such.
If you want to get attachments from an attachment table created by the EnableAttachments tool, then you should use the Attachments() function (as Josh said).
If your attachments are from a table created by a user, then I'd guess the problem is that you try to store the result of FeatureSetByName into a reserved variable name (Attchments). Try this:
// the name attachments is reserved for the Attachments() function var attach = FeatureSetByRelationshipName($feature, 'rel_Structure_Attachments', ['globalid'], false); if (Count(attach) > 0) { return "Relationships were found." } else { return "No relationship were found." }
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.