I published a weblayer where there are my UN layers and my device feature class has a attribute rules. Also there are GDB_Validation<Point/Line/Polygon>Errors and GDB_ValidationObject feature classes/table.
On device feature class there is a calculation rules in batch:
arcade code assigned to device before share weblayer
var timestart=Now()
var pointGeometry = Geometry($feature)
var fsPolygon = FeatureSetByName($datastore,"dbname.sde.classx",["*"], true)
var polygonGeometry = First (Intersects(fsPolygon, pointGeometry))
if (polygonGeometry == null) return "nessuno"
return polygonGeometry.COMUNE + ' exec.' + DateDiff(Now(),timestart,'milliseconds') + 'ms'
arcade code assigned to device within weblayer (after share as weblayer)
var timestart=Now()
var pointGeometry = Geometry($feature)
var fsPolygon = FeatureSetByName($datastore,"{FA346ECC-9B15-42D9-B690-CE97B5089E03}",["*"], true)
var polygonGeometry = First (Intersects(fsPolygon, pointGeometry))
if (polygonGeometry == null) return "nessuno"
return polygonGeometry.COMUNE + ' exec.' + DateDiff(Now(),timestart,'milliseconds') + 'ms'
The Arcade code use a feature class (classx) that exist in my enterprise geodatabase (the some where there are the feature class that I used in weblayer) isn't included in the weblayer (like class1,class2, class3 example on https://community.esri.com/t5/attribute-rules-blog/attribute-rules-exclude-from-application/ba-p/1016604 example).
In the calculation attribute rule there are the text error and number string. I tried to use rules with "exclude from application evaluation" option and without it too.
The classx is registered as branch version and validation feature class like other feature and the weblayer has been published using version managment and validation option.

Now, when I consume within arcgis pro the weblayer and I try to add a feature within device the element is added but the field "COMUNE" is empty and no errors appear. Maybe the rule was never executed. Why the classx name has been translate in a code? Which log I can control to understand and solve this issue?

SW: Pro 3.1.1/AGS with federated Portal11.0