Hello,
I have just started my first experiments with attribute rules.
In my organization, for house numbers, we have an attribute key for each feature, which is composed of the attributes "STRSCHL" and "HAUSNR". These are separated by an underscore. Using the attribute rules, I have managed with the following expression that this key is automatically generated and automatically adjusts when changes are made in the attributes "STRSCHL" or "HAUSNR".
$feature.STRSCHL+'_'+$feature.HAUSNR
However, there are other elements in the feature class that should not receive this key. In these, however, the underscore is always present. Using the following expression, I have now tried that the key is only assigned to features that contain the value "33100" in the attribute "OS_2".
If (Includes([$feature.OS_2],33100)) {
return
$feature.STRSCHL+'_'+$feature.HAUSNR
}
Now in the expression builder I do not get an error message about a syntax error. However, the key is not generated in practice, unlike the code above. Do I still have an error in my input or do I have to use another function?