I have a map that contains three items = a feature layer of properties, a feature layer of other locations, and a table related to the latter that represents a 1:M relationship. In playing with the FeatureSet functions I can get this statement to return a featureset of records from the table, and has 115,882 records in it:
var RelRecs = FeatureSetById($datastore, "1")
But the following statements both return empty record sets:
var RelRecs = FeatureSetById($map, "18908250d82-layer-4")
var RelRecs = FeatureSetByName($map, "NuisancePoints FS - Adapt Location Call Details")
Aren't these just different ways of accessing the same item and should return the same result? My suspicion is there is something different about the scope of $datastore versus $map that I am not fully understanding.
The reason this becomes important is I'd like to tie the table also to my first layer, which contains the same unique parcel ID. The first layer is not part of the same service as the layer/table pair so I thought using the $map parameter would allow me to access the table but it doesn't, obviously.