Hi,
I'm trying to apply an attribute rule on a table (lightingintervention)
linked by a relationship class on a feature class (luminaire).
The rule must trigger on the insertion of a new record or on the update and allows you to:
When a new intervention is created the value of the "STATUS" field in my
feature class "luminaire" must change.
Here is my code:
var relid = $feature.PARENTGUID
var fsrel = FeatureSetByName($datastore, "gocite.GOCITE.Luminaire",["globalid","etat","objectid"],false)
var frel = filter(fsrel,"globalid = @relid")
var rel = first(fsrel)
var BonEtat = 1
var Reparer = 2
if(isempty($feature.dateeffectuee)){
var et = Reparer}
else{
var et = BonEtat}
return {
'edit':[{
'classname':'gocite.GOCITE.Luminaire',
'updates':[{
'globalID':relid,
'attributes':{
'Etat':et
}
}]
}]
}
Error message :

I need help with the error, I can't find how to fix it
Tanks !