I have uploaded a shape file to AGOL as a hosted feature layer and I have created a form in Field Maps to capture data in the field. The feature layer has an address field and I was wondering if it's possible for the address to auto populate in this field when field users capture collection points?
Thank you
Yes, that is possible by using Arcade and a Calculated Expression for the address field.
Can you please elaborate @ArmstKP . I understand we can use arcade expressions to pull from other data layers within map but still do see how to auto populate attributes directly from "dropped pin"/"collect here" screen.
@SPGilbert I guess I don't understand. You can create a calculated expression, that goes out and finds the address number that intersects with the dropped pin/point and it populates that value in this field in Field Maps designer...
@ArmstKP, I believe I'm the one that doesn't understand. Can you give me an example expression that performs this?
@SPGilbert If you have your address layer in AGOL, use the below:
var features = Intersects(FeatureSetByPortalItem(Portal('https://www.arcgis.com'),"Your AGOL Item Number for Your Address Layer Goes Here", 0), $feature);
if (Count(features) > 0) {
return First(features)['Your Address Number Field Name Goes Here']
}
@ArmstKP OK, your pulling that information from one of your own parcel/data layers. When you drop a pin within Field Maps, it brings up the coordinates and the associated address for that location. So the ability I'm asking Esri for is to allow us to pull the information directly. Sort of like within Survey123, where you can pull lat/long from geopoint collection and reverse geocode it directly, without having to use a separate address layer source. Thanks for the example.
I, too would like to see this feature