Why can't I retrieve any attachments when using an attribute rule, Insert trigger on a layer that has attachments enabled?
This is an Enterprise Geodatabase that's published to Enterprise 11.4 as a referenced feature service.
Both methods below fail to retrieve the attachment on the photo_point layer.
Count(Attachments($feature))
//always reports 0
var sql = Concatenate(["(rel_globalid = '",$feature.globalid,"')"]);
var photoTableFeatSet = Filter(FeatureSetByName($datastore,'dbname.dbo.photo_point__ATTACH',['rel_globalid','att_name'],false),sql);
Count(photoTableFeatSet)
//always reports 0
I even setup a feature service webhook on photo_point layer, listening for 'AttachmentsCreated', which successfully fires a powerAutomate flow.
But, inside the flow, calling /extractChanges, with the below query params
{
"token": "validToken",
"dataFormat": "json",
"layers": "[5]",
"returnAttachments": "true",
"returnAttachmentsDataByUrl": "true",
"f": "json",
"serverGens": "1742307850054,1742307850055"
}
then the returned change "attachments" value always is this:
"attachments": {
"adds": [],
"updates": [],
"deleteIds": []
}
what is happening?
All I want to do is retrieve attachments on a feature that is inserted into a layer. Either by attribute rule or feature service webhook, I don't care!