Attribute Rules

All feature classes accessed by Attribute Rules must be located in the same database.

Unique ID Sequence

  • Every Signs GIS layer has a unique ID field that will be automatically populated by a Database Sequence.

    • Asset Locations - ASSET_LOCATIONS_ID

    • Asset Signs Poles - ASSET_SIGNS_POLES_ID

  • Attribute Rule is not Editable

  • Triggers - Insert

  • Execution - Exclude from application evaluation

Text(NextSequenceValue("ATD_ADMIN.atd_signs_data_sequence"))

Intersection ID

  • Only the Asset Locations GIS layer has the INTERSECTION_ID field, which is automatically calculated based on a Thiessen Polygon layer of the COA Intersection Points layer. This layer is used to find the closest Intersection point to the new record that has been added.

  • If the Intersection ID that is automatically calculated is not the Intersection ID you would like entered, the field is editable where a new Intersection ID can be entered (Editable is checked).

  • Triggers - Insert

  • Execution - Exclude from application evaluation

var intersectLayer = Intersects(FeatureSetByName($datastore, "ATD_ADMIN.COA_Intersection_Points_TP"), $feature);
for (var fc in intersectLayer) {
   return fc.INTERSECTION_ID
}

Segment ID

  • Only the Asset Locations GIS layer has the SEGMENT_ID field, which is automatically calculated based on the ATD Maintained Streets Line layer.

  • If the Segment ID is left null or is automatically calculated to a Segment ID that is not ideal, the field is editable where a new Segment ID can be entered (Editable is checked).

  • Triggers - Insert

  • Execution - Exclude from application evaluation

// Get closest feature - populates SEGMENT_ID field based on closest attribute

var searchDist = 1000;
var streets = Intersects(FeatureSetByName($datastore, "ATD_ADMIN.atd_maintained_streets", ['SEGMENT_ID'], true), Buffer($feature, searchDist, "feet"));
var cnt = Count(streets)
var nearestStreet;
var minDist = 250;
for (var f in streets) {
    var streetDist = Round(Distance(f, $feature, "feet"), 2);
    if (streetDist < minDist) {
       nearestStreet = f.SEGMENT_ID;
       minDist = streetDist;
    }
}
return nearestStreet;

Engineering Area

  • Only the Asset Locations GIS layer has the ENGINEER_AREA field, which is automatically calculated based on the Engineering Service Areas polygon layer.

  • If a feature is moved after it is created, the ENGINEER_AREA field will automatically update.

  • The ENGINEER_AREA field is not manually editable. If the field is changed by accident, it will default back based on the Attribute Rule (Editable is not checked).

  • Triggers - Insert, Update

  • Execution - Exclude from application evaluation

var EngServAreaInt = Intersects(FeatureSetByName($datastore, "ATD_ADMIN.engineering_service_areas", ["ATD_ENGINEER_AREAS"]), $feature);
for (var fc in EngServAreaInt) {
   if (fc.ATD_ENGINEER_AREAS == 'CENTRAL') {
   return 'CENTRAL'
   }
   else if (fc.ATD_ENGINEER_AREAS == 'NORTH') {
   return 'NORTH'
   }
   else if (fc.ATD_ENGINEER_AREAS == 'SOUTH') {
   return 'SOUTH'
   }
   else {
   return ''
   }
}
if (Count(EngServAreaInt) == 0) {
return ''
}

Jurisdiction

  • Only the Asset Locations GIS layer has the JURISDICTION field, which is automatically calculated based on the Jurisdictions polygon layer.

  • If a feature is moved after it is created, the JURISDICTION field will automatically update.

  • The JURISDICTION field is not manually editable. If the field is changed by accident, it will default back based on the Attribute Rule (Editable is not checked).

  • Triggers - Insert, Update

  • Execution - Exclude from application evaluation

var JurisInt = Intersects(FeatureSetByName($datastore, "BASE_ADMIN.jurisdictions", ["JURISDICTION_TYPE_SPECIFICS"]), $feature);
for (var fc in JurisInt) {
   return fc.JURISDICTION_TYPE_SPECIFICS
}
if (Count(JurisInt) == 0) {
return ''
}

Council District

  • Only the Asset Locations GIS layer has the COUNCIL_DISTRICT field, which is automatically calculated based on the Single Member Districts polygon layer.

  • If a feature is moved after it is created, the COUNCIL_DISTRICT field will automatically update.

  • The COUNCIL_DISTRICT field is not manually editable. If the field is changed by accident, it will default back based on the Attribute Rule (Editable in not checked).

  • Triggers - Insert, Update

  • Execution - Exclude from application evaluation

var CounDistInt = Intersects(FeatureSetByName($datastore, "BASE_ADMIN.single_member_districts", ["COUNCIL_DISTRICT"]), $feature);
for (var fc in CounDistInt) {
   return fc.COUNCIL_DISTRICT
}
if (Count(CounDistInt) == 0) {
return ''
}

X Coordinate

  • Only the Asset Locations GIS layer has the X_COORDINATE field, which is automatically calculated based on the features location.

  • If a feature is moved after it is created, the X_COORDINATE field will automatically update.

  • The X_COORDINATE field is not manually editable. If the field is changed by accident, it will default back based on the Attribute Rule (Editable is not checked).

  • Coordinates calculated are based on the NAD 1983 State Plane Texas Central FIPS 4203 (US Feet) coordinate system.

  • Triggers - Insert, Update

  • Execution - Exclude from application evaluation

Geometry($feature).x

Y Coordinate

  • Only the Asset Locations GIS layer has the Y_COORDINATE field, which is automatically calculated based on the features location.

  • If a feature is moved after it is created, the Y_COORDINATE field will automatically update.

  • The Y_COORDINATE field is not manually editable. If the field is changed by accident, it will default back based on the Attribute Rule (Editable is not checked).

  • Coordinates calculated are based on the NAD 1983 State Plane Texas Central FIPS 4203 (US Feet) coordinate system.

  • Triggers - Insert, Update

  • Execution - Exclude from application evaluation

Geometry($feature).y

Last updated