I tried to use somekind of condition of another attribute object to set the attribute with pre-set enumeration values {"", "1","2","3"}, something like:
if ( o."attr1" = "AA" ) {
o."enumeratedAttr" = "1"
} else if (o."attr1" = "BB" ) {
o."enumeratedAttr" = "1"
} else {
o."enumeratedAttr" = "" //no change as default
}
However, as enumeration attribute return its element as DBE. My script above won't work. So How can I set/select one of enumeration values at each condition. Thanks.