I have a point layer of several points & several polygons. I need to link these by finding out all the points that are in x polygon. I need Pro to lookup the polygon that a point resides in & to write this value out.
Example
Point A is in Polygon B. The output feature will be recorded as Polygon B.
The code below returns a geometry error on line 4
The polygon layer is called ExportedCentreAreas which is stored in my personal geodb.

// load the other featureset
var fs = FeatureSetByName($datastore, "ExportedCentreAreas")
// get the first feature from fs that intersects the current $feature
var f = First(Intersects(fs, $feature))
// abort if we didn't find something
if(f == null) { return }
// return the intersecting feature's value
return f.Children_s_Centre_Cluster