Hello ESRI Community!
I am still very much a rookie when it comes to Arcade and programming in general really. So I could use some assistance in getting my Attribute Assistant Tool setup ported over to ArcGIS Pro.
Below are some records from my dynamicvalue table that I'm having challenges in translating into a single or multiple attribute rules.
39 | WASTE_TABLE | PU_DAY | EXPRESSION | IIF([EXCPT_TYPE]="Landuse" OR [EXCPT_TYPE]="Multi-Residential" OR [EXCPT_TYPE]="New Development" OR [EXCPT_TYPE]="Private","No Pickup",Nothing) | TRUE | TRUE | FALSE | FALSE | 6 | <Null> |
32 | WASTE_TABLE | ZONE | EXPRESSION | Left([ZONE], 1) | TRUE | TRUE | FALSE | FALSE | 5 | <Null> |
33 | WASTE_TABLE | ZONE | EXPRESSION | IIF([ZONE] = "A","ZoneA", IIF([ZONE] = "B","ZoneB", IIF([ZONE] = "C","ZoneC", IIF([ZONE] = "P","ZoneP", IIF([ZONE] = "S","ZoneS", IIF([ZONE] = "U","ZoneU","<Null>")))))) & " - " | TRUE | TRUE | FALSE | FALSE | 4 | <Null> |
34 | WASTE_TABLE | ZONE | EXPRESSION | IIF(IsNull([EXCPT_TYPE]),[ZONE] & " " & [PU_DAY], IIF([EXCPT_TYPE]<>"BIA",[ZONE] & " Exception - ",[ZONE])) | TRUE | TRUE | FALSE | FALSE | 3 | <Null> |
35 | WASTE_TABLE | ZONE | EXPRESSION | IIF([EXCPT_TYPE]="Pickup",[ZONE] & " " & [PU_DAY],[#]) | TRUE | TRUE | FALSE | FALSE | 2 | <Null> |
36 | WASTE_TABLE | ZONE | EXPRESSION | IIF([EXCPT_TYPE]="Thorah",[ZONE] & " " & [EXCPT_TYPE],[#]) | TRUE | TRUE | FALSE | FALSE | 1 | <Null> |
37 | WASTE_TABLE | ZONE | EXPRESSION | IIF([EXCPT_TYPE]="BIA",[ZONE] & " " & [EXCPT_TYPE] & " - " & [PU_DAY],[#]) | TRUE | TRUE | FALSE | FALSE | 1 | <Null> |
38 | WASTE_TABLE | ZONE | EXPRESSION | IIF([EXCPT_TYPE]= "Private" OR [EXCPT_TYPE]="New Development" OR [EXCPT_TYPE]="Landuse" OR [EXCPT_TYPE]="Multi-Residential",[ZONE] & " " & [PU_DAY] & " - " & [EXCPT_TYPE],[#]) | TRUE | TRUE | FALSE | FALSE | 1 | <Null> |
I could really use some help in translating these expressions into appropriate Attribute Rule within ArcGIS Pro. Any guidance on how to do this would be greatly appreciated. : )
Arcade has iif and decode, but I think using an array and checking to see if the value is included is easier
For example, your one expression
IIF([EXCPT_TYPE]= "Private" OR [EXCPT_TYPE]="New Development" OR [EXCPT_TYPE]="Landuse" OR [EXCPT_TYPE]="Multi-Residential",[ZONE] & " " & [PU_DAY] & " - " & [EXCPT_TYPE],[#])
would be converted to this
var valid_values = ["Private", "New Development", "Landuse", "Multi-Residential"];
if (Includes(valid_values,$feature.EXCPT_TYPE)){
return $feature.ZONE + " " + $feature.PU_DAY + " - " + $feature.EXCPT_TYPE
}
else{
return $feature.EXCPT_TYPE
}
Thank you for this. This certainly will help!