Hi @erica_poisson ,
In the returned json I notice that the geometry also contains the spatial reference for each feature. I am not sure if this may be causing any conflict.
"spatialReference": {
"latestWkid": 3857,
"wkid": 102100
}
We can change the expression and exclude that part and see what happens. I must admit that in the past I have had situations where a correctly formed JSON is created and an empty feature set is returned. Not sure if we are running into a restriction here.
One thing we can try is this:
// settings
var p = 'https://www.arcgis.com';
var itemID_CMpts = 'xxx';
var layerID_CMpts = 0;
var relationshipName = "";
// access first featureset
var fs1 = Filter(FeatureSetByPortalItem(Portal(p), itemID_CMpts, layerID_CMpts, ['Point_Status', 'EQ_File_Number', 'Inspection_Date'], true), "Point_Status ='Unstable' AND EQ_File_Number In ('EQ2015-078', 'Eq2013-026', 'EQ2018-082', 'EQ2018-052', 'EQ2001-080X', 'EQ2003-021', 'EQ1989-015', 'EQ2002-023', 'EQ2002-045X', 'EQ2019-110', 'EQ2020-017', 'EQ2019-091', 'EQ2018-029', 'EQ2020-033', 'EQ2019-036', 'EQ2020-052', 'EQ2019-064', 'EQ2017-040', 'EQ2020-031', 'EQ2021-003', 'EQ2011-016', 'EQ2017-026', 'EQ2021-020')");
// create data schema
var Dict = {
'fields': [
{'name': 'EQNum', 'type': 'esriFieldTypeString'},
{'name': 'InspecDate', 'type': 'esriFieldTypeDate'},
{'name': 'PtStatus', 'type': 'esriFieldTypeString'}],
'geometryType': 'esriGeometryPoint',
'features':[]};
// analysis and fill Dict
var i = 0;
for (var f in fs1) {
var fs2 = FeatureSetByRelationshipName(f, relationshipName, ['Point_Status_revisit'], false);
var cnt = Count(fs2);
if (cnt == 0) {
Dict.features[i] = {
'geometry': {
'x': Geometry(f)["X"],
'y': Geometry(f)["Y"]
},
'attributes': {
'EQNum': f["EQ_File_Number"],
'InspecDate': f["Inspection_Date"],
'PtStatus': f["Point_Status"]
}
};
i++;
}
}
Console(Text(Dict));
return FeatureSet(Text(Dict));
Please share back what is returned in the console.