Pick attribute value from underlying layer while adding a feature

1601
2
05-16-2016 05:35 AM
Nicole_Ueberschär
Esri Regular Contributor


Me again 😉

I was wondering if (and how) I could add a feature to an editable layer and store at the same time e.g. the parcel ID of the underlying parcel to my new feature.

Maybe to make it more clear:

I would like my users to add a point with comments related to a parcel they are interested in for investment. So the idea is that the user looks for a certain parcel that meets his requirements (the enhancedSearch Widget is very helpful at this point) and when he found one or two that he would be interested in he can put a point (like a sticker) on this plot, add a comment and his details. To have a connection between this point and the parcel I would like to retrieve the parcel ID from the parcel he clicked on to add the point and add its value automatically to the Parcel_ID field of my comments attribute table.

Thank you for your ideas!

0 Kudos
2 Replies
TimWitt2
MVP Alum

What widget would you use to do the editing?

You should be able to alter that code to run a query against the parcel first, wherever the user clicks, and fill a certain field with the found value.

I would have maybe used the parcel ID from the search unit but then there would be an issue if the user choose a different parcel by hand.

0 Kudos
Nicole_Ueberschär
Esri Regular Contributor

At the moment I am using the regular edit widget. Hmmm, will try to find the right place to put the query - I am not that advanced yet...

Yes, indeed, using the result from the search is not advisable because he might find two ...

Thanks so far!

General question: If I share my app to the public can everyone edit this layer? Or do people still need a (any) named user to edit a layer?

0 Kudos