How to best edit tabular data of feature layer?

3563
2
02-18-2015 12:43 PM
BenAller
New Contributor III

I have a arcgis-hosted feature layer that I'd like public users to query  based on a unique value and then see the results in a tabular view.  From there, they would edit a field (w/ coded value domain).  Ideally, the screen could be split with a map for users to have the option to zoom to selected table record if they wish. 

I spent a bit of time looking at samples and the api reference, but I'm scratching my head a bit on best way to implement this.  Could the Feature Table widget (though beta) be an approach?

Does anyone have advice on how this can be achieved?

Thanks much,

Ben

0 Kudos
2 Replies
by Anonymous User
Not applicable

Hi Ben - I have not explored editing from a table because it seems to require better knowledge of server communication than I currently possess, but I can share what has worked for me using out of the box solutions.

I use Dgrid to display a table, with a little query box above it. The Dgrid content can change based on features returned from a query and row-clicks zoom to that particular feature:

dgrid | ArcGIS API for JavaScript

I then do editing in the map infowindow by clicking the feature after zooming. The Attribute Inspector widget set within the map infowindow allows for editing (so it's a pop-up when you click the feature):

AttributeInspector | API Reference | ArcGIS API for JavaScript

However, the Attribute Inspector can be put in any div so if you wanted to do a split window, you could set it on one half of the screen. Users would still need to click a feature to get the editor, or you could look into programmatically displaying it based on a click in a table row since that click event would have the id you need to select.

I also have an edit on/off button so that when the map starts a feature click displays the normal pop-up, but when editing is enabled it displays the Attribute Inspector. And when edits are saved I refresh the Dgrid results to reflect edits.

Not very elegant, but it works. Good luck!

0 Kudos
RickeyFight
MVP Regular Contributor

Sarah Clark​    

I think I am looking to do what you have already done.

I want to edit attributes in Infowindow and allow the user to view a table and zoom to selected.

Would you be willing to share your code?

Thank you!

0 Kudos