{ "currentVersion": 11.1, "cimVersion": "3.1.0", "id": 1, "name": "Hydrant Valve 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 valve needs immediate attention (red) or attention (orange)\n// // Following fields are new and will be derived from Valve_Issues field\nvar Valve_Located = $feature.Valve_Located // 'N' -> RED\nvar Cap_Seized = $feature.Cap_Seized // 'Y' -> RED\nvar Rock_Catcher_Present = $feature.Rock_Catcher_Present // 'N' -> orange\nvar Water_Surfacing = $feature.Water_Surfacing // 'Y' -> orange\nvar Operating_Clearance = $feature.Operating_Clearance // 'N' -> orange\nvar Rod_Condition = $feature.Rod_Condition // 'Broken' -> RED, 'Missing' -> RED, 'Seized -> Red\nvar Valve_Close_Fully = $feature.Valve_Close_Fully // 'N' -> orange\nvar Casing_Attention = $feature.Casing_Attention // 'Y' -> orange\nvar Cap_Replacement = $feature.Cap_Replacement // 'Y' -> orange\nvar Operating_Condition = $feature.Operating_Condition //'Inoperable' -> RED\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 it is from year(s) prior to current\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 (Operating_Condition == \"Inoperable\" || Valve_Located == \"N\" || Cap_Seized == \"Y\" || Rod_Condition == \"Broken\" || Rod_Condition == \"Missing\" || Rod_Condition == \"Seized\"){\n var RED_check = true}\n\nvar ORANGE_check = false\nif (Cap_Replacement == \"Y\" || Casing_Attention == \"Y\" || Rock_Catcher_Present == \"N\" || Water_Surfacing == \"Y\" || Operating_Clearance == \"N\" || Valve_Close_Fully == \"N\"){\n var ORANGE_check = true}\n\nWhen(RED_check, \"Immediate Attention Required\",\nORANGE_check, \"Attention Required\",\nIsEmpty(ParentGUID) || stale_inspection, \"Inspection Not Started/Stale\",\n\"Inspection Completed\") //last argument is default value if no expression/result pair evaluates to true", "valueExpressionTitle": "Inspection Status", "uniqueValueInfos": [ { "symbol": { "type": "esriPMS", "url": "17c4dd3f76a885f14e96af4549d563ca", "imageData": "iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAwUlEQVQYlX3QMUtCYRQG4GdwaBPHloYLDSFEEK3RcANBkYJrW2Net5YIFyFwcnUy/QfiJA3+iqA/4OBQQ4NzW3xO98Zn73YOD+ccTkU8h/j626xEYDLgdUiO9X/44Iluk/Sb5wm9vbhJ/ZLOEW7IJ0zxHsO1Ex6OSUJxigGjIXfYlnCHVkpeLW9KP8iWzIq4ds1jmFZMOOeW/pJFmL7DbbILziOfcUbS4H7FOODkiv4PNjGNjJcVbwF/zsnne2Ah218FtiQOwAigtwAAAABJRU5ErkJggg==", "contentType": "image/png", "width": 8, "height": 7, "angle": 0, "xoffset": 0, "yoffset": 0 }, "value": "Immediate Attention Required", "label": "Immediate Attention Required" }, { "symbol": { "type": "esriPMS", "url": "4714abea2c4c3a757603b5a8982aec5b", "imageData": "iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA5ElEQVQYlWNhwA4kGRgYnqMLsmBRqNQTyzCzZDFDOgMDwz18ijkawhjSAs0ZXJ59YCjr28yQgVNxqDmDtoseQ6iSGANDtDVDet9mhlkMDAznsCkW1JFnSNWSZlACcYyUGBh6Yhk6SxYzhDEwMLxHURxrz+DjY8SQLsiN0A1yzqm7DCGrjjHMRlYs6GfMkA8yDcWnYgwMMTYMFauOMawBmQ5WHGbFEGKtzmCMJWQYTJQZlPxNGWI3nmaYBFKs5KHPUPH9NwPDvVfYlDMwxNszNGw8zbAFpPjZogMM6YsOYFeIBN4DAMp1NDE3JXj4AAAAAElFTkSuQmCC", "contentType": "image/png", "width": 8, "height": 7, "angle": 0, "xoffset": 0, "yoffset": 0 }, "value": "Attention Required", "label": "Attention Required" }, { "symbol": { "type": "esriPMS", "url": "4fb6d860377c5c4c84c1f33ac42c2309", "imageData": "iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA40lEQVQYlWNhwA4kGRgYnqMLsmBRqCQfyzDz4WKGdAYGhnv4FHPIhDCkCZkyuPx6x1D2fCtDBk7FIuYM2gK6DKHsYgwMIjYM6c+3MsxiYGA4h02xIKc8QyqHDIMSiMOtyMAgH8vQ+XAxQxgDA8N7FMVi9gw+AoYM6SzcCN0g53y9yxDy5hjDbGTFggJGDPkg05AByDnC1gwVb44xrAGZDlYsYsUQwqvOYIwlZBh4lBmUhE0ZYt+eZpgEUqzEr8dQ8e8XA8PPV9iUMzCI2DE0vD3NsAWk+Nmbgwzpbw5iV4gE3gMAhGMx9dKseVIAAAAASUVORK5CYII=", "contentType": "image/png", "width": 8, "height": 7, "angle": 0, "xoffset": 0, "yoffset": 0 }, "value": "Inspection Completed", "label": "Inspection Completed" }, { "symbol": { "type": "esriPMS", "url": "2eda30f4d4f6f29b680222fe6ec922db", "imageData": "iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA5ElEQVQYlWNhwA4kGRgYnqMLsmBRqGSf2DPz4PySdAYGhnv4FHNYRTWkqVoGunz98KzszPq+DJyKNWxCteX1XUL5JZQYNOyi08+s75vFwMBwDptiQWF5nVQhWS0lEEdc2YjBPrGn8+D8kjAGBob3KIo1nWJ9FE180jl4BOG6Qc55fudUyK3Dq2YjKxZUNfXLB5mGDEDO0bKLqbh1eNUakOlgxWq2YSFSmtbG2MJQQtVESdnCP/buiY2TQIqVlAw9Kv78+s7w8QVKSMGBtmN8w90TG7eAFD+7tn9R+rX9i7AqRALvAbIWQ5DfafgpAAAAAElFTkSuQmCC", "contentType": "image/png", "width": 8, "height": 7, "angle": 0, "xoffset": 0, "yoffset": 0 }, "value": "Inspection Not Started/Stale", "label": "Inspection Not Started/Stale" } ], "fieldDelimiter": ",", "authoringInfo": { "colorRamp": { "type": "multipart", "colorRamps": [ { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 215, 252, 238, 255 ], "toColor": [ 215, 252, 238, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 179, 250, 255 ], "toColor": [ 252, 179, 250, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 196, 182, 255 ], "toColor": [ 252, 196, 182, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 202, 207, 252, 255 ], "toColor": [ 202, 207, 252, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 238, 252, 179, 255 ], "toColor": [ 238, 252, 179, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 237, 210, 255 ], "toColor": [ 252, 237, 210, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 252, 202, 228, 255 ], "toColor": [ 252, 202, 228, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 179, 252, 182, 255 ], "toColor": [ 179, 252, 182, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 205, 179, 252, 255 ], "toColor": [ 205, 179, 252, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 212, 252, 207, 255 ], "toColor": [ 212, 252, 207, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 197, 235, 252, 255 ], "toColor": [ 197, 235, 252, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 182, 252, 222, 255 ], "toColor": [ 182, 252, 222, 255 ] }, { "type": "algorithmic", "algorithm": "esriCIELabAlgorithm", "fromColor": [ 182, 251, 252, 255 ], "toColor": [ 182, 251, 252, 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": "OBJECTID", "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": "Status", "type": "esriFieldTypeString", "alias": "Status", "length": 10, "domain": null }, { "name": "Type", "type": "esriFieldTypeString", "alias": "Type", "length": 200, "domain": null }, { "name": "SHAPE", "type": "esriFieldTypeGeometry", "alias": "SHAPE", "domain": null }, { "name": "ParentGUID", "type": "esriFieldTypeGUID", "alias": "ParentGUID", "length": 38, "domain": null }, { "name": "Condition", "type": "esriFieldTypeString", "alias": "Condition", "length": 255, "domain": null }, { "name": "Function_", "type": "esriFieldTypeString", "alias": "Function_", "length": 255, "domain": null }, { "name": "Capacity", "type": "esriFieldTypeString", "alias": "Capacity", "length": 255, "domain": null }, { "name": "Criticality", "type": "esriFieldTypeString", "alias": "Criticality", "length": 255, "domain": null }, { "name": "Renewal_Cost", "type": "esriFieldTypeDouble", "alias": "Renewal_Cost", "domain": null }, { "name": "Construction_Cost", "type": "esriFieldTypeDouble", "alias": "Construction_Cost", "domain": null }, { "name": "Location_Accuracy", "type": "esriFieldTypeString", "alias": "Location_Accuracy", "length": 10, "domain": null }, { "name": "Redline_Submission", "type": "esriFieldTypeString", "alias": "Redline_Submission", "length": 10, "domain": null }, { "name": "Cap_Replacement", "type": "esriFieldTypeString", "alias": "Cap_Replacement", "length": 10, "domain": null }, { "name": "Casing_Attention", "type": "esriFieldTypeString", "alias": "Casing_Attention", "length": 10, "domain": null }, { "name": "Operating_Condition", "type": "esriFieldTypeString", "alias": "Operating_Condition", "length": 50, "domain": null }, { "name": "Valve_Issues", "type": "esriFieldTypeString", "alias": "Valve_Issues", "length": 200, "domain": null }, { "name": "Close_Turns", "type": "esriFieldTypeSmallInteger", "alias": "Close_Turns", "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": "Cap_Seized", "type": "esriFieldTypeString", "alias": "Cap_Seized", "length": 10, "domain": null }, { "name": "Valve_Located", "type": "esriFieldTypeString", "alias": "Valve_Located", "length": 10, "domain": null }, { "name": "Rock_Catcher_Present", "type": "esriFieldTypeString", "alias": "Rock_Catcher_Present", "length": 10, "domain": null }, { "name": "Water_Surfacing", "type": "esriFieldTypeString", "alias": "Water_Surfacing", "length": 10, "domain": null }, { "name": "Operating_Clearance", "type": "esriFieldTypeString", "alias": "Operating_Clearance", "length": 10, "domain": null }, { "name": "Rod_Condition", "type": "esriFieldTypeString", "alias": "Rod_Condition", "length": 50, "domain": null }, { "name": "Valve_Close_Fully", "type": "esriFieldTypeString", "alias": "Valve_Close_Fully", "length": 10, "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, "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": "d62f1657f2e7436a9964cfeb74f4b226" }