Select to view content in your preferred language

Pull data from a geoshape to get attribute from another map layer

1632
5
Jump to solution
08-19-2022 01:49 PM
MPach
by
Frequent Contributor

I've successfully been able to get a parcel id (unique identifier) from my parcel layer by having the user select a parcel on a map using Survey123 and Experience Builder. My next step seems like it can be done, but is more difficult than my current skill set. I need to take the parcel id field that I got from the geoshape and use that data to access a sewer basin layer. 

So, what I'd like to do is with the parcel id I need to locate where that parcel intersects with the sewer basin layer and find what basin it's located it, then put that basin id in a new field on my survey.

Is something like that possible? I know I can do it after the fact in web map, but I'd like to do everything in the survey so all the data from survey goes into the feature layer I'm capturing my survey data on rather than having to create a new data layer or join the data. 

Thanks, 

Mark 

0 Kudos
1 Solution

Accepted Solutions
MPach
by
Frequent Contributor

I'm not sure how well describe my issue was before, but I'd like to post the solution to this in case it can help someone else. 

Here's a brief description of what I was trying to do again:

I was attempting to do grab attribute information from a point layer as it intersected a polygon layer, that I had the user specify in a Survey123 question, and report back the unique id of the point layer so I could determine the available fire flow at that node. 

Solution:

I couldn't figure out how to do this in Survey123. There were a few complications for my why:

1) I'm not that familiar with Survey123, this was my first survey.

2)  In order to get the functionality I needed to pull a parcel id from a user selection I had to use the survey tool in Experience Builder to integrate my survey and tie the data together. I think @IsmaelChivite did a blog on this, but I can't find it to reference it right now. 

After talking to one of my colleagues about processing the data afterwards in the feature service the data was getting written to he suggest that we try Arcade and create an attribute rule. After a few minutes of fiddling around and with his help I ended up using this little snippet to perform the intersect. We of course altered it to work with the feature services I was using. 

//Get the id for the zoning layer in the map
var zoning = FeatureSetById($map, 'Planning_7092')

//Get features from zoning that intersect clicked location
var relatedRecords = Intersects(zoning, $feature)

//String to print
var address_details = ''

//Iterate through each row and format
for(var row in relatedRecords) {​​
    address_details = address_details
    + 'Zoning District:        ' + row.UDO_LABEL + ' '
    + TextFormatting.NewLine
}​​​​​​​​​

//print related addresses
return address_details

 That seemed to work out well. 

I'd love to here if there are other ways to do what I was trying to do it Survey123. 

Thanks for the help and input.

Mark

View solution in original post

0 Kudos
5 Replies
ZacharySutherby
Esri Regular Contributor

Hello @MPach

We are currently working on a new function called pulldata("@layer") which should allow you to reach your end goal. We have the feature partially available for testing in our Early Adopter Community, please feel free to test with the functionality to see if it will work in your use case. 

Thank you,
Zach
MPach
by
Frequent Contributor

After a lot of exploration yesterday I ran into the autocomplete search() function using the intersect to pull data from a feature class. I'm going to test that today and see if it does what I need it to today. I'll update this question if it works out. 

0 Kudos
MPach
by
Frequent Contributor

I'm not sure how well describe my issue was before, but I'd like to post the solution to this in case it can help someone else. 

Here's a brief description of what I was trying to do again:

I was attempting to do grab attribute information from a point layer as it intersected a polygon layer, that I had the user specify in a Survey123 question, and report back the unique id of the point layer so I could determine the available fire flow at that node. 

Solution:

I couldn't figure out how to do this in Survey123. There were a few complications for my why:

1) I'm not that familiar with Survey123, this was my first survey.

2)  In order to get the functionality I needed to pull a parcel id from a user selection I had to use the survey tool in Experience Builder to integrate my survey and tie the data together. I think @IsmaelChivite did a blog on this, but I can't find it to reference it right now. 

After talking to one of my colleagues about processing the data afterwards in the feature service the data was getting written to he suggest that we try Arcade and create an attribute rule. After a few minutes of fiddling around and with his help I ended up using this little snippet to perform the intersect. We of course altered it to work with the feature services I was using. 

//Get the id for the zoning layer in the map
var zoning = FeatureSetById($map, 'Planning_7092')

//Get features from zoning that intersect clicked location
var relatedRecords = Intersects(zoning, $feature)

//String to print
var address_details = ''

//Iterate through each row and format
for(var row in relatedRecords) {​​
    address_details = address_details
    + 'Zoning District:        ' + row.UDO_LABEL + ' '
    + TextFormatting.NewLine
}​​​​​​​​​

//print related addresses
return address_details

 That seemed to work out well. 

I'd love to here if there are other ways to do what I was trying to do it Survey123. 

Thanks for the help and input.

Mark

0 Kudos
IsmaelChivite
Esri Notable Contributor

Hi @MPach   Thanks a lot for sharing your experience!  Another soon-to-be approach to do this is described in this video: https://community.esri.com/t5/arcgis-survey123-videos/point-in-polygon-queries-coming-to-the-survey1... 

MPach
by
Frequent Contributor

Exactly what I needed for this project! Thanks for the heads up @IsmaelChivite 

0 Kudos