{ "currentVersion": 11.1, "cimVersion": "3.1.0", "id": 1, "name": "Spring Hydrant Inspection Status", "type": "Feature Layer", "description": "", "geometryType": "esriGeometryPoint", "sourceSpatialReference": { "wkid": 102187, "latestWkid": 3776, "xyTolerance": 0.001, "zTolerance": 0.001, "mTolerance": 0.001, "falseX": -5622600, "falseY": -10001100, "xyUnits": 10000, "falseZ": -100000, "zUnits": 10000, "falseM": -100000, "mUnits": 10000 }, "copyrightText": "", "parentLayer": null, "subLayers": [], "minScale": 0, "maxScale": 0, "referenceScale": 0.0, "drawingInfo": { "renderer": { "type": "uniqueValue", "valueExpression": "//playground test variables. Use $feature. notation when implementing\n\n// var to test if inspection exists\nvar ParentGUID = $feature.ParentGUID // null = no inspection exists, otherwise an inspection exist and proceed to check next conditions\n\n//vars to test if hydrant needs immediate attention (red) or attention (orange)\nvar Operating_Clearance = $feature.Operating_Clearance // 'N' -> orange\nvar Traffic_Flange_Height = $feature.Traffic_Flange_Height // 'Too High' -> orange, 'Too Low' -> orange\nvar Operation = $feature.Operation //'Seized' -> RED, 'Stiff' -> orange\nvar Side_Ports = $feature.Side_Ports //'Fail' -> orange\nvar Pump_Port = $feature.Pump_Port // 'Fail' -> orange\nvar Pressure_Test = $feature.Pressure_Test // 'N' -> orange\nvar Hydrant_Drain = $feature.Hydrant_Drain // 'N' -> orange\n\n// vars to test if inspection is stale\nvar inspection_year = Year($feature.created_date) //e.g. test value: Date(2019,3,5) - inspection year. month integer ranges from 0-11, which is not intuitive. 0 is January. adjust date in statement as required\nvar current_year = Year(Date()) // current year\n\n//compare the inspection year to the current year and return true (stale) if difference is greater or equal to 5 years\nvar stale_inspection = false\nif (inspection_year < current_year){\n var stale_inspection = true}\n\n//check if valve should be flagged as red or orange\nvar RED_check = false\nif (Operation == \"Seized\"){\n var RED_check = true}\n\nvar ORANGE_check = false\nif (Operating_Clearance == \"N\" || Traffic_Flange_Height == \"Too Low\" || Traffic_Flange_Height == \"Too High\" || Side_Ports == \"Fail\" || Pump_Port == \"Fail\" || Pressure_Test == \"N\" || Hydrant_Drain == \"N\"){\n var ORANGE_check = true}\n\nWhen(RED_check, \"Immediate Attention Required\",\nORANGE_check, \"Attention Required\",\nIsEmpty(ParentGUID), \"Inspection Not Started\",\nstale_inspection, \"Inspection Stale\",\n\"Inspection Completed\") //last argument is default value if no expression/result pair evaluates to true", "valueExpressionTitle": "Inspection Status", "uniqueValueInfos": [ { "symbol": { "type": "esriSMS", "style": "esriSMSCircle", "color": [ 230, 0, 0, 255 ], "size": 7, "angle": 0, "xoffset": 0, "yoffset": 0, "outline": { "color": [ 0, 0, 0, 255 ], "width": 0.6 } }, "value": "Immediate Attention Required", "label": "Immediate Attention Required" }, { "symbol": { "type": "esriSMS", "style": "esriSMSCircle", "color": [ 255, 170, 0, 255 ], "size": 7, "angle": 0, "xoffset": 0, "yoffset": 0, "outline": { "color": [ 0, 0, 0, 255 ], "width": 0.6 } }, "value": "Attention Required", "label": "Attention Required" }, { "symbol": { "type": "esriSMS", "style": "esriSMSCircle", "color": [ 56, 168, 0, 255 ], "size": 7, "angle": 0, "xoffset": 0, "yoffset": 0, "outline": { "color": [ 0, 0, 0, 255 ], "width": 0.6 } }, "value": "Inspection Completed", "label": "Inspection Completed" }, { "symbol": { "type": "esriSMS", "style": "esriSMSCircle", "color": [ 0, 112, 255, 255 ], "size": 7, "angle": 0, "xoffset": 0, "yoffset": 0, "outline": { "color": [ 0, 0, 0, 255 ], "width": 0.6 } }, "value": "Inspection Not Started", "label": "Inspection Not Started" }, { "symbol": { "type": "esriSMS", "style": "esriSMSCircle", "color": [ 158, 170, 215, 255 ], "size": 7, "angle": 0, "xoffset": 0, "yoffset": 0, "outline": { "color": [ 0, 0, 0, 255 ], "width": 0.6 } }, "value": "Inspection Stale", "label": "Inspection Stale" } ], "fieldDelimiter": ",", "authoringInfo": { "colorRamp": { "type": "multipart", "colorRamps": [ { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 194, 242, 255 ], "toColor": [ 252, 194, 242, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 185, 252, 179, 255 ], "toColor": [ 185, 252, 179, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 184, 240, 252, 255 ], "toColor": [ 184, 240, 252, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 218, 179, 255 ], "toColor": [ 252, 218, 179, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 179, 195, 252, 255 ], "toColor": [ 179, 195, 252, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 184, 189, 255 ], "toColor": [ 252, 184, 189, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 234, 252, 207, 255 ], "toColor": [ 234, 252, 207, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 179, 252, 228, 255 ], "toColor": [ 179, 252, 228, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 212, 225, 252, 255 ], "toColor": [ 212, 225, 252, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 217, 210, 255 ], "toColor": [ 252, 217, 210, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 216, 184, 252, 255 ], "toColor": [ 216, 184, 252, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 212, 232, 255 ], "toColor": [ 252, 212, 232, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 215, 252, 242, 255 ], "toColor": [ 215, 252, 242, 255 ] } ] } } }, "scaleSymbols": true, "transparency": 0, "labelingInfo": null }, "defaultVisibility": true, "extent": { "xmin": -5622450.17161471, "ymin": -1.000096453265511E7, "xmax": 5622450.17161471, "ymax": 1.000096453265511E7, "spatialReference": { "wkid": 102187, "latestWkid": 3776, "xyTolerance": 0.001, "zTolerance": 0.001, "mTolerance": 0.001, "falseX": -5622600, "falseY": -10001100, "xyUnits": 10000, "falseZ": -100000, "zUnits": 10000, "falseM": -100000, "mUnits": 10000 } }, "hasAttachments": false, "htmlPopupType": "esriServerHTMLPopupTypeAsHTMLText", "displayField": "PhaseName", "typeIdField": null, "subtypeFieldName": null, "subtypeField": null, "defaultSubtypeCode": null, "fields": [ { "name": "GlobalID", "type": "esriFieldTypeGUID", "alias": "GlobalID", "length": 38, "domain": null }, { "name": "OBJECTID", "type": "esriFieldTypeInteger", "alias": "OBJECTID", "domain": null }, { "name": "ASSET_ID", "type": "esriFieldTypeString", "alias": "ASSET_ID", "length": 30, "domain": null }, { "name": "Make_Model", "type": "esriFieldTypeString", "alias": "Make_Model", "length": 255, "domain": null }, { "name": "Status", "type": "esriFieldTypeString", "alias": "Status", "length": 10, "domain": null }, { "name": "FAC_Date", "type": "esriFieldTypeDate", "alias": "FAC_Date", "length": 8, "domain": null }, { "name": "Source", "type": "esriFieldTypeString", "alias": "Source", "length": 300, "domain": null }, { "name": "PhaseName", "type": "esriFieldTypeString", "alias": "PhaseName", "length": 150, "domain": null }, { "name": "Neighbourhood", "type": "esriFieldTypeString", "alias": "Neighbourhood", "length": 100, "domain": null }, { "name": "Install_Year", "type": "esriFieldTypeSmallInteger", "alias": "Install_Year", "domain": null }, { "name": "SHAPE", "type": "esriFieldTypeGeometry", "alias": "SHAPE", "domain": null }, { "name": "GDB_GEOMATTR_DATA", "type": "esriFieldTypeBlob", "alias": "GDB_GEOMATTR_DATA", "domain": null }, { "name": "ParentGUID", "type": "esriFieldTypeGUID", "alias": "ParentGUID", "length": 38, "domain": null }, { "name": "Static_PSI", "type": "esriFieldTypeSmallInteger", "alias": "Static_PSI", "domain": null }, { "name": "Dynamic_PSI", "type": "esriFieldTypeSmallInteger", "alias": "Dynamic_PSI", "domain": null }, { "name": "Condition", "type": "esriFieldTypeString", "alias": "Condition", "length": 10, "domain": null }, { "name": "Function_", "type": "esriFieldTypeString", "alias": "Function_", "length": 10, "domain": null }, { "name": "Capacity", "type": "esriFieldTypeString", "alias": "Capacity", "length": 10, "domain": null }, { "name": "Criticality", "type": "esriFieldTypeString", "alias": "Criticality", "length": 10, "domain": null }, { "name": "Renewal_Cost", "type": "esriFieldTypeDouble", "alias": "Renewal_Cost", "domain": null }, { "name": "Operating_Clearance", "type": "esriFieldTypeString", "alias": "Operating_Clearance", "length": 10, "domain": null }, { "name": "Traffic_Flange_Height", "type": "esriFieldTypeString", "alias": "Traffic_Flange_Height", "length": 255, "domain": null }, { "name": "Side_Ports", "type": "esriFieldTypeString", "alias": "Side_Ports", "length": 255, "domain": null }, { "name": "Pump_Port", "type": "esriFieldTypeString", "alias": "Pump_Port", "length": 255, "domain": null }, { "name": "Operation", "type": "esriFieldTypeString", "alias": "Operation", "length": 255, "domain": null }, { "name": "Hydrant_Drain", "type": "esriFieldTypeString", "alias": "Hydrant_Drain", "length": 10, "domain": null }, { "name": "Make_Model_Rel", "type": "esriFieldTypeString", "alias": "Make_Model_Rel", "length": 255, "domain": null }, { "name": "Body_Year", "type": "esriFieldTypeInteger", "alias": "Body_Year", "domain": null }, { "name": "Pump_Port_Type", "type": "esriFieldTypeString", "alias": "Pump_Port_Type", "length": 255, "domain": null }, { "name": "Comments", "type": "esriFieldTypeString", "alias": "Comments", "length": 400, "domain": null }, { "name": "created_user", "type": "esriFieldTypeString", "alias": "created_user", "length": 255, "domain": null }, { "name": "created_date", "type": "esriFieldTypeDate", "alias": "created_date", "length": 8, "domain": null }, { "name": "last_edited_user", "type": "esriFieldTypeString", "alias": "last_edited_user", "length": 255, "domain": null }, { "name": "last_edited_date", "type": "esriFieldTypeDate", "alias": "last_edited_date", "length": 8, "domain": null }, { "name": "W3_Operator", "type": "esriFieldTypeString", "alias": "W3_Operator", "length": 120, "domain": null }, { "name": "Water_Proximity", "type": "esriFieldTypeString", "alias": "Water_Proximity", "length": 10, "domain": null }, { "name": "Pressure_Test", "type": "esriFieldTypeString", "alias": "Pressure_Test", "length": 10, "domain": null }, { "name": "Inspection_Cycle", "type": "esriFieldTypeString", "alias": "Inspection_Cycle", "length": 30, "domain": null }, { "name": "ESRI_OID", "type": "esriFieldTypeOID", "alias": "ESRI_OID", "domain": null } ], "geometryField": { "name": "SHAPE", "type": "esriFieldTypeGeometry", "alias": "SHAPE" }, "indexes": [ { "name": "FDO_GlobalID", "fields": "GlobalID", "isAscending": true, "isUnique": true, "description": "" } ], "subtypes": [], "relationships": [], "canModifyLayer": true, "canScaleSymbols": false, "hasLabels": false, "capabilities": "Map,Query,Data", "maxRecordCount": 2000, "supportsStatistics": true, "supportsExceedsLimitStatistics": true, "supportsAdvancedQueries": true, "hasZ": true, "supportedQueryFormats": "JSON, geoJSON, PBF", "isDataVersioned": false, "ownershipBasedAccessControlForFeatures": {"allowOthersToQuery": true}, "useStandardizedQueries": true, "supportedSpatialRelationships": [ "esriSpatialRelIntersects", "esriSpatialRelContains", "esriSpatialRelCrosses", "esriSpatialRelEnvelopeIntersects", "esriSpatialRelIndexIntersects", "esriSpatialRelOverlaps", "esriSpatialRelTouches", "esriSpatialRelWithin", "esriSpatialRelRelation" ], "advancedQueryCapabilities": { "useStandardizedQueries": true, "supportsStatistics": true, "supportsPercentileStatistics": true, "supportsHavingClause": true, "supportsOrderBy": true, "supportsDistinct": true, "supportsCountDistinct": true, "supportsPagination": true, "supportsLod": false, "supportsQueryWithLodSR": false, "supportsTrueCurve": true, "supportsQueryWithDatumTransformation": true, "supportsReturningQueryExtent": true, "supportsQueryWithDistance": true, "supportsSqlExpression": true, "supportsTimeRelation": true, "supportsSqlFormat": false, "supportsQueryAnalytic": true }, "supportsDatumTransformation": true, "advancedQueryAnalyticCapabilities": { "supportsLinearRegression": true, "supportsAsync": false, "supportsPercentileAnalytic": true }, "dateFieldsTimeReference": { "timeZone": "UTC", "respectsDaylightSaving": true }, "preferredTimeReference": { "timeZone": "Mountain Standard Time", "respectsDaylightSaving": true }, "datesInUnknownTimezone": false, "hasMetadata": true, "isDataArchived": false, "archivingInfo": { "supportsQueryWithHistoricMoment": false, "startArchivingMoment": -1 }, "supportsCoordinatesQuantization": true, "supportsDynamicLegends": true, "serviceItemId": "7666e2317e14423d87447073a52f1b97" }