AnsweredAssumed Answered

Autofill Fields Using Overlapping Point Buffers Using Arcade?

Question asked by Zemken12_1 on Apr 5, 2019
Latest reply on Apr 5, 2019 by Zemken12_1

I was inspired by KGerrow's blog post to autogeneraet some attributes when creating a feature since it could save hundreds of hours of time. I'm looking for some feedback on my methods and code below. My aim is to autopopulate the field of one point feature layer from a field value of another point feature layer when I generate a new feature in a web map. What makes this different than what I have seen is that I have to buffer the point first to make sure the data is joined correctly.

 

I I think I'm missing some key piece of code to put the data from layer A into layer B. When I test

 

  1. Define var A and field I want to extract from
  2. Define var B and field I want to put the value into
  3. Define var C - which buffers the A  20 feet so when the new feature is created next to it, it pulls the info from A into B. 
  4. Return Layer A field ID into newly generated feature of Layer B into ID field.

 

var A = FeatureSetByName($map, "A")
var B = FeatureSetByName($map, "B")
var C = Intersects(Buffer($feature, 20, 'feet'), FeatureSetByName($map, "A"))

 

for (var C in B)
        {return C.ID}

 

 

How do I take the field from the buffered layer C and put it into layer B?

Outcomes