I have an application where I am using the editing functionality. It works as long as I enter information for all fields, but if any field are missing information, I receive Unable to perform applyEdits error.
My live application is at:http://maps.decaturil.gov/streetsignshttp://geonet.esri.com/
My github project is at: https://github.com/csergent45/streetSigns/tree/176dbb8a76f3773964ab25987f8e4f8cabcc9308
and here is the error that I am receiving:
If I enter data in for all fields, the application runs without a hitch. The JavaScript file is in the app folder named main.js.
Any ideas?
Solved! Go to Solution.
I had this issue in .NET and was able to fix it by removing the '' or replacing them in my insert statements, but I am not sure how to do that in JavaScript.
I would try editing all the values in your input,
(<input id="location" name="location" value="Under your nose" type="text">)
to ones that fit your schema just to ensure it is not the issue. I did notice that your "Name" field had the type set to "email" not sure if that could be a validation issue, but it could be worth double checking.
That's actually the feedback form from the project that I have been converting. I haven't been using that form.
I would look into using native Dojo form elements to properly validate against. It will allow for rule enforcement like number and date values in the proper fields.
Your GITHUB should now have a pull request addressing the form validation for the 3 problem children.
Also, note the changes reflect being ran against JSHint and addressing the errors that appeared.
Thanks. I modified your code and I no longer have to enter any data. Check it out:
if ((attributes.supportId === undefined) || (attributes.supportId === "")) { attributes.supportId = null; } if ((attributes.dateInv === undefined) || (attributes.dateInv === "")) { attributes.dateInv = null; } if ((attributes.addrCode === undefined) || (attributes.addrCode === "")) { attributes.addrCode = null; }
As long as your back-end database supports it and the data structure doesn't panic on joins, should be fine.
Good point. We will have to address that with real data.
Do you know how to do a git pull? I need to merge my data to my local project.
Are you talking about a local change or my pull request?
Usual workflow...
/repository <user>$ git pull
For working on a branch... <Recalling from memory so I may be off... Anyone, please correct me where wrong.>
/repository <user>$ git checkout -b <branch name>
/repository <user>$ git branch
master
* <branch name>
[ do some work ]
/repository <user>$ git commit -a -m "Comments"
[ when ready to commit to master... ]
/repository <user>$ git checkout master
/repository <user>$ git fetch upstream // In case there is work outside of your commits.
/repository <user>$ git merge upstream
/repository <user>$ git merge <branch name>
/repository <user>$ git push
/repository <user>$ git branch -d <branch name>
I got it to work. Guessed at it, but I will bookmark this, just in case I run into the issue again. Thanks.