Esri / geoform-template-js

GeoForm is a configurable template for form based data editing of a Feature Service.
http://esri.github.io/geoform-template-js/
Apache License 2.0
67 stars 83 forks source link

GeoForm feature editing user interface #156

Open pjdohertygis opened 10 years ago

pjdohertygis commented 10 years ago

A User is updating address attributes and verifying the geometry. They would like to be able to access those attributes on the Form itself, not via attribute table.

For context - sernst@spokanecounty.org - Shawna Ernst

driskull commented 10 years ago

@pjdohertygis Lets review this after Sept release for Dec.

pjdohertygis commented 10 years ago

Another example image

They want to use the GeoForm to simply update the location of existing data and check attributes for accuracy. I suggested the Collector in the meantime, but they liked the GeoForm interface.

pjdohertygis commented 10 years ago

Another example - from Royce Jones "Can GeoForm be configured for attribute editing only? I'd like to have anonymous users update attributes of existing features but not create new features."

RE: Election mapping

pjdohertygis commented 10 years ago

"alextaochen says: I had a quick try on the GeoForm template with my map shared on ArcGIS Online. It’s a great app, but what I found is it does not work with existing features. I mean I could only add new points by pinpointing on the map while not able to edit attributes for existing point features.

Also, when I tried with config with the GeoForm app it didn’t allow me to select my feature layer (Step 2) if it has “Add new features” setting disabled. August 21, 2014 at 5:47 pm"

driskull commented 10 years ago

Alright, lets try and do it for the next release.

julio8a commented 10 years ago

@driskull do you still need my help with this issue?

driskull commented 10 years ago

Yes, we want to be able to edit existing entries.

julio8a commented 10 years ago

@driskull I don't fully understand the issue, can we meet up to discuss?

driskull commented 10 years ago

Sure. Currently, we just allow adding new features through this form. Paul wants to be able to edit existing features. So when you click on a feature, the form is populated with the information and you can edit the values instead of submitting a new one.

driskull commented 10 years ago

If updates are allowed in the feature service, then anyone can edit. Otherwise, only owner can edit.

sirws commented 9 years ago

Here is another request I have gotten that is asking for the same thing: "Is there any way that it can be changed to update existing features? How it is now I had to create a new feature service for it to be able to work. We are hoping to use it as an administrative data entry tool. Which would be easiest if we were able to update existing features."

TFimpel commented 9 years ago

I have been following this thread for a long time and just wanted to voice that this enhancement would fill the gap that still exists among the javascript solutions currently offered by ESRI: editing on a small mobile device (insert + update/delete) is not realistically possible with any of the templates or the web app builder config options. I am an Enterprise GIS administrator - not much of a web developer, so I can't contribute to the code here - and just wanted to add that for my organization (and probably for many others, too) this enhancement would be incredibly valuable. It would be a HUGE improvement, really. (Sorry for yet another similar comment.)

johngillham commented 8 years ago

I second TFimpel's comments...we've been begging for this functionality for a REALLY long time....has there been ANY progress on it? It'd open the tool up to an entirely new set of uses that are really crucial to most use case scenarios. A tool that allows new entry only seems very incomplete. PLEASE give us a status update on this and set it as a HIGH priority item to finally get accomplished. PLEASE....

pjdohertygis commented 8 years ago

@johngillham

1) This is the workaround I have been using in the meantime - A geoform embedded in the Map Series Story Map next to a custom web app with editing enabled.

image

2) I'd suggest getting this request onto the ArcGIS Ideas page http://ideas.arcgis.com/ and finding people to vote and enter their use cases there. That usually proves to be pretty effective and helps give the developers a better idea of how to implement the solution. The more information your provide the better. Let me know when / where the Idea is posted and I will up-vote it too!

ebonan commented 8 years ago

@johngillham I totally agreee...Geoform is a great application but needs EDITS options to be a real solution for operative filed surveys. We actually use Collector for ArcGIS but in some case, where the attributes editing is the most important goal , we'd need a form centric application with full editing capabilies.

driskull commented 8 years ago

I'd suggest getting this request onto the ArcGIS Ideas page http://ideas.arcgis.com/

That's a good idea.

I'd like to implement this, but there's lots of work to be done with the 4.0 API that needs my attention currently.

Here are a couple similar you may upvote.

http://ideas.arcgis.com/ideaView?id=087E0000000CyEXIA0 http://ideas.arcgis.com/ideaView?id=087E0000000Cx0PIAS

johngillham commented 8 years ago

@pjdohertygis thanks for sharing your workaround! Great idea, although a shame it's even needed obviously. @driskull thanks for the links for upvoting, I certainly voted on it and would encourage everyone else reading this to as well. Sadly it kinda feels like a step backwards though to be trying to up the priority through the generic blackhole of ideas.arcgis.com rather than upping the priority of this ticket directly here...never know how much effect ideas.arcgis.com has overall. I can see this ticket has been on your guys plate for a REALLY long time and certainly understand you have to focus on the priorities as directed, but given all of my experiences with helping quite a few clients get setup using geoforms, their responses are always the exact same (in this order): 1) "Yea! We love the simplicity of it! This is awesome!" 2) "Finally...I can just enter info and don't have to deal with maps just to enter tabular data!" 3) "How do I edit what I just submitted?"

It kills me because most clients I've setup with Geoforms initially love it, but quickly end up abandoning it entirely because they can't edit existing records. Seems like it wouldn't take an extreme effort to allow a search by one field, pull that record into the fields in the form, edit the fields, and resubmit the applyEdits call? (That also comes from not knowing the backend so it may be more complicated than I'm seeing it as.) Is an "online-only edit existing point records" functionality that complex? I can definitely attest from the users side that you'd pick up a WHOLE LOT more users if that one bit of functionality was added...even more so than lines & polys in my opinion. There are a TON of people out there that don't want to live in the "maps world" that we all love and adore, but have a real need for a simple form-based data collection tool that Geoforms provides so well. But without being able to edit the record they just submitted, it's just not a viable tool for the vast majority of folks I've tried to introduce it to. Which is such a shame b/c it's one of the best little tools ESRI's has produced in my opinion! Just desperately needs some existing records TLC...

grifonigor commented 8 years ago

I'm totally agree with johngillham, we have a same problem in our organisation. GeoForm need feature editing user interface.

clm42 commented 8 years ago

I would love to see editing of existing features in a GeoForm but my immediate need will require custom coding regardless because I want to read from one featureclass and write to another. I want to use a form for fire hydrant inspections where a user will click a hydrant which populates the form and creates a new inspection feature in the same location. These are saved as a new feature in the wHydrantInspection featureclass of LGIM. This is a unique situation though, in most cases though I think direct updating of the features would be preferred.

clm42 commented 8 years ago

I have this nearly working now. It was surprisingly simple to tweak the 'on click' block to look for a the 'graphic' property of the event object returned by the click. If you clicked on a feature service point the event has a property called graphic which in turn has a geometry object and all the features attributes. If that exists it uses that geometry object instead of the click location and populates the form fields. I haven't worked out how to trick it into letting me have a hidden OBJECTID field. I need to make it add the OBJECTID and change this._formLayer.applyEdits from using the first parameter to the second which tells the server its an update and not a new feature. Im new to GitHub so I'll have to learn out how to push the update back up for ESRI to look at.

ebonan commented 8 years ago

Great! Tris seems very encouraging. I'm not a developer so i can't help you but i'm very Happy to hear that community wants workin on this essential festure. Thank you. Enrico

clm42 commented 8 years ago

I forked this onto my own account and uploaded my changes. Ive gotten it as far as snapping to a clicked existing point and auto-populating the form fields with the existing attribute data but I cant get it to commit the edits to a feature. The 3.17 API is throwing me an error that editing a feature service isn't enabled even though the app is already editing a feature service when you create a new feature and the 3.17 docs show how to update features on a feature layer. If anyone wants to look at my changes they are in js\main.js. Maybe @driskull can point me in the right direction or at least shine light on what the road block is. I'm a Python guy 99% of the time so this is a steep learning curve.

https://github.com/clm42/geoform-template-js

pjdohertygis commented 8 years ago

Quick question - which browser are you using when trying to submit the edit? Google Chrome made a recent security update that may impact edit and access transactions. For instance the item property page / data tab on editable layers does not appear to load.

I think Esri is working with the Chrome developers to resolve.

Sent from my iPhone

On 30/08/2016, at 3:29 AM, clm42 notifications@github.com wrote:

I forked this onto my own account and uploaded my changes. Ive gotten it as far as snapping to a clicked existing point and auto-populating the form fields with the existing attribute data but I cant get it to commit the edits to a feature. The 3.17 API is throwing me an error that editing a feature service isn't enabled even though the app is already editing a feature service when you create a new feature and the 3.17 docs show how to update features on a feature layer. If anyone wants to look at my changes they are in js\main.js. Maybe @driskull can point me in the right direction or at least shine light on what the road block is. I'm a Python guy 99% of the time so this is a steep learning curve.

https://github.com/clm42/geoform-template-js

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

clm42 commented 8 years ago

@pjdohertygis I've been working in Firefox because I can use Firebug to see things like data sent POST when the app is using SSL which I cant do with Fiddler.

edit: Ive taken the request to sent to the service's applyEdits function, manually entered it, and it takes the edit just fine so I know the REST is working correctly.

clm42 commented 8 years ago

Some of my methodology in a bit clunky I think but it works. Balls in your court @driskull. If anyone else wants to play with it I only have the one repository so its easy to find. All the edits are to main.js in "on click" and _formLayer.applyEdits or immediately around them.

The defualts.js config now has a couple entries at the bottom for if you want to edit existing features and a list for layers you want to snap to. The list needs to include the editable one if you want to update existing. I have a deployment already being used that just uses the snapping and auto-populating parts since I figured those out a while back. I am using it for fire hydrant inspections and the FACILITYID field auto-populates from the snapped hydrant into the same field in the inspection feature class.

We might want to add a field when edit-existing is on that appears when a feature is snapped to that lets the user choose to add a coincident feature instead of updating the existing one. No clue how to do that, the form generation section is confusing. This also only lets you update the attributes, not the geometry but its a start.

driskull commented 8 years ago

Very cool @clm42. Glad to see the community working with templates 👍

I'm focussing on a GeoForm template for the 4.x version of the API so I'm not likely to be doing much with this repo besides bug fixes.

clm42 commented 8 years ago

@driskull Will the 4.0 version incorporate editing existing features? Once I brushed up my JS and figured out the code a bit the logic wasn't really all that complicated to implement.

driskull commented 8 years ago

@clm42 yep! I'm planning on all of the stuff that users have been asking for. Some of it has to wait for API support though. Like lines/polygons editing. Drawing isn't in 4.x yet. Editing is coming soon.