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
- Define var A and field I want to extract from
- Define var B and field I want to put the value into
- 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.
- 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)
How do I take the field from the buffered layer C and put it into layer B?