Select to view content in your preferred language

attribute rules acts not as expected

450
1
09-06-2020 09:11 PM
OrrGvili
Occasional Contributor

Hi 

I have attribute rule to update field based on other field value and  values from tables, 

its working ok when i edit the GrowthName field 

but i try to edit the field the rules applied (Growth Code) when i apply the change the value change back to null 

even if the GrowthName is  null 

and i cant figure out why 

var Growth = $feature.GrowthName
var GrowthList = FeatureSetByName($datastore,"GrowthCodeTable",["Code","Name"])
if (Growth != null ){
    var sql = "Name = @Growth ";
    var filterGrowth = Filter(GrowthList, sql)
    var GrowthCode =  First(filterGrowth).Code
    return GrowthCode 
}
0 Kudos
1 Reply
by Anonymous User
Not applicable

HiOrr Gvili Madhav GavkadkarRobert Instrall

It seems you have not configured the attribute rule on the field "Growth Code" for edit operation of Update.

Regards,

Manoj