With the following, I get an error. Is it even possible to use a feature service as an input in an attribute rule? What I'm trying to do is calculate a value on insert/update based on the intersecting value from the feature service.
var fsPolyBoundary <SPAN class="operator token">=</SPAN> FeatureSetByName<SPAN class="punctuation token">(</SPAN>$datastore<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"https://services1.arcgis.com/fBc8EJBxQRMcHlei/arcgis/rest/services/NABAT_CONUS_10x10_KM_GRID_CELLS/FeatureServer/0"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="string token">"GRTS_ID "</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> true<SPAN class="punctuation token">)</SPAN>
var fsPoly <SPAN class="operator token">=</SPAN> Intersects<SPAN class="punctuation token">(</SPAN>fsPolyBoundary<SPAN class="punctuation token">,</SPAN> Geometry<SPAN class="punctuation token">(</SPAN>$feature<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
var loc <SPAN class="operator token">=</SPAN> First <SPAN class="punctuation token">(</SPAN>fsPoly<SPAN class="punctuation token">)</SPAN>
var name <SPAN class="operator token">=</SPAN> <SPAN class="string token">""</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>loc <SPAN class="operator token">==</SPAN> null<SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">return</SPAN> <SPAN class="punctuation token">{</SPAN><SPAN class="string token">"errorMessage"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"Point must be created in a Grid."</SPAN><SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">else</SPAN>
name <SPAN class="operator token">=</SPAN> loc<SPAN class="punctuation token">.</SPAN>LOC_NAME
<SPAN class="keyword token">return</SPAN> name <SPAN class="operator token">+</SPAN> <SPAN class="string token">" - "</SPAN> <SPAN class="operator token">+</SPAN> $feature<SPAN class="punctuation token">.</SPAN>LOC_NAME<SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>