PROBLEM
When configuring a smart form in Field Maps Designer using the FeatureSetByPortalItem and FeatureSetByName functions to dynamically populate fields based on spatial intersection with a reference layer, the expression runs successfully. However, when the form is used in ArcGIS Field Maps on iOS devices, the expression fails to return the expected results.
This is a known limitation when smart forms configured with the FeatureSetByPortalItem function in Field Maps Designer are used in ArcGIS Field Maps on iOS devices. This behavior is specific to iOS and does not affect Android devices. Refer to BUG-000177300 for more information.
To resolve the issue, configure the smart form using the FeatureSetByName() function instead of FeatureSetByPortalItem() in Field Maps Designer.
// Template: Pull attribute from intersecting feature via layer name var layerName = "<ReferenceLayer>"; // Name of the reference layer var fieldName = "<FieldName>"; // Attribute you want to return
var refFS = FeatureSetByName( $map, layerName, [fieldName], true ); if (IsEmpty(refFS) || IsEmpty($feature)) { return "OUT"; } var hits = Intersects(refFS, $feature); for (var f in hits) { return f[fieldName]; } return "OUT";
The image below shows the example of the calculated expression using the FeatureSetByName() function with 'Geology' as the reference layer in the 'Arcade editor' window.
Note: The FeatureSetByName() function requires the reference layer to be added to the same web map used in ArcGIS Field Maps.
The image below shows the 'Test1' field correctly populated in ArcGIS Field Maps on iOS devices when the features are within the reference layer.
Article ID: 000037035
Get help from ArcGIS experts
Download the Esri Support App