Hey I'm trying to migrate our Attribute Assistant rules from Desktop to Pro and ran into some issues with trying to configure the calculation rules to generate our system valve Unique ID. Within Attribute Assistant we had 2 expressions to generate our ID's
1) Generate a unique ID on the FACILITYID field - ex 14000
2) Next an expression was created to select the HYDRANTFLAG = Yes then add "HV-" + FacilityID, also if the ValveType was 300 then "AV-" + FacilityID
Within Arcade I'm currently using 2 rules
Rule 1 code:
var id = NextSequenceValue("wSysV_Seq");
return id
I'm having trouble with part 2, my goal is that when:
- the field ACTIVEFLAG = "Yes" then the FacilityID = "HV-" + FacilityID
- If ValveType= 300 then FacilityID = "AV-"+ FacilityID
- then the rest should be "MV-" + FacilityID
I'm still new to Arcade so thank you for helping out in advance.