1

I am really new to ArcGIS Online and the first steps in coding.

I created a webmapp app: users can create clinics (as points) and each time they create a new point they have to choose in a list the region, the province, and the district (attributes editing in a pop up) I added to the webmap a district layer (as polygons) with 3 fields (region name, province name, and district name)

I would like each time they create/edit a new clinic, the mentioned fields to be automatically populated with the values of the district the clinic is within. I searched quite a lot, and I don't really know how to calculate a field on the fly or what would be the expression and the language for it. I think it should be on the pop config with SQL but I really don't know where to start.

Do I do that in the webmap, with another tool in ArcGIS Pro, or using ArcPy?

4
  • 1
    Your point layer will have the region, province, district fields with all the required attribute information? If the web app is public feel free to share the URL. Commented Oct 17, 2021 at 8:04
  • Have a look at doing a spatial join: doc.arcgis.com/en/arcgis-online/analyze/join-features.htm . This can be done so that you get a hosted feature layer view that is a read-only database view based on joining the two source layers according to the spatial relationship you define (eg, "within"). Commented Oct 18, 2021 at 1:15
  • I'm not sure how you would do what you want to do in a webapp, but here is an answer I gave on how to do it with feature classes in ArcPy... may be helpful, may not be... gis.stackexchange.com/a/87055/18630 Commented Oct 18, 2021 at 1:22
  • To attract votes to re-open your question I think you should decide whether you want to ask about ArcGIS Online or ArcGIS Pro in this particular question. If it's ArcGIS Pro, and you want to ask about ArcPy then please include a code snippet that illustrates what you've tried and where you're stuck.
    – PolyGeo
    Commented Oct 18, 2021 at 1:42

0