Hi All,
This seems to be more complicated than it needs to be. I am not sure if I am not doing something correct.
Goal: Using Field Maps to collect assets (Points) and make them floor aware during the collection by dynamically passing values from the underlying layer (Units). This is ArcGIS Online.
Layers: Asset layer (Point)
Floor aware layers: Units>>Levels>>Facilities
Method:
- Creating the asset layer with Indoors Schema. All the following fields were included:
- SITE_ID
- SITE_NAME
- FACILITY_ID
- FACILITY_NAME
- LEVEL_ID
- LEVEL_NUMBER
- LEVEL_NAME
- VERTICAL_ORDER
- NAME
- Created a domain (all the LEVEL_IDs for the building) for the LEVEL_ID field. The value of the field would be passed as parameter to the Units layer and populate the rest of the fields in the asset layer. Thereby making the asset layer dynamically floor aware.
- A floor-aware map was created in ArcGIS Pro and published as a webmap, which works well with the floor-picker widget.
- The webmap is brought into Field Maps. The floor picker works perfectly.
- Each of the required fields have following Arcade expression:
var polygon = FeatureSetByName($map, "Units", ["FIELD_NAME","LEVEL_ID" ])
var ints = Intersects(polygon, $feature)
for(var int in ints)
{
if(int["LEVEL_ID"]==$feature.LEVEL_ID)
{
return int["FIELD_NAME "]
}
}
Result: All the required fields have values transferred to the point asset layer from Units layer based on the LEVEL_ID. But the LEVEL_ID field cannot be used both as a field to pass the parameter and used as a field for floor filter. Once selected as floor filter field it becomes un-editable and not available in Field Maps form. Hence, the layer remains not floor-aware.
What is it that I am doing wrong. Any pointers will be appreciated.