Hello, I am just trying to prepare attribute rule to check if $feature.field matches one of strings in an array, and then, if yes, another field is going to be populated with specific attribute value.
I have tried the code below but unfortunately it returned an error, saying "Close Parenthesis expected in line 2"
Much appreciated if anyone point out any cause of the problem or give me a solution.
var array1 = ["Lake", "Mountain", "River"]
if (array1.includes($feature.FeatureType)) {
return {
result: {
attributes: {
ThemeType: "Nature"
}
}
}
}
Solved! Go to Solution.
Thanks a lot MikeMillerGIS!
It works fine now.