Page 1 of 3

Database Update Service: How?

Posted: Fri Jun 28, 2013 8:27 pm
by Christopher Herold

It would be awesome if there were a tutorial on how to update a database entry. I am trying to use the database update service and it isn't entirely clear how to go about specifying the row that needs to be updated. For instance, in the database query service "where" is included in the request field to select the rows of interest, however, this does not appear to exist for the update service.


Database Update Service: How?

Posted: Fri Jun 28, 2013 8:36 pm
by maxkatz

You don't use 'where' when doing an update. You update a particular object by specifying its id in the URL: http://docs.appery.io/documentation/b...


Database Update Service: How?

Posted: Fri Jun 28, 2013 8:59 pm
by Christopher Herold

Is there documentation for updating a database using the GUI format in the Data tab after I create the database_update_service?

I can use the Data tab GUI successfully for the Query and List Services ...looking for similar functionality for UPDATE.


Database Update Service: How?

Posted: Fri Jun 28, 2013 10:11 pm
by maxkatz

Did you generate the service via Create New Database Service?


Database Update Service: How?

Posted: Fri Jun 28, 2013 10:29 pm
by Christopher Herold

Yes I did. I have a list of service parameters under the Edit MappingRequest tab as listed below. I imagine object_id is the the key I would use to identify the row? Is that correct?

Name Value JavaScript
X-Appery-Database-Id Add JS
X-Appery-Session-Token Add JS
user_name Add JS
user_id Add JS
text Add JS
object_id


Database Update Service: How?

Posted: Fri Jun 28, 2013 10:36 pm
by maxkatz

[quote:]
I imagine object_id is the the key I would use to identify the row? Is that correct?
[/quote]
Correct. That will identify the object. Any fields you add will be updated. Any fields you don't list, won't be updated.


Database Update Service: How?

Posted: Thu Jan 30, 2014 2:12 am
by Nalini

Hello, I have the same question. I'm trying to update a small form which uses create service to send data to appery db.

I used update service [request tab] to update form but results are now showing up in db. I've attached images. Can you tell me if my mapping is correct?

Image Image


Database Update Service: How?

Posted: Thu Jan 30, 2014 2:42 am
by Nalini

Hello, I wasn't sure if i should start another thread, but the question is almost the same, except I'm using local storage variable to identify the record that needs to be updated.


Database Update Service: How?

Posted: Thu Jan 30, 2014 10:46 am
by Maryna Brodina

Hello! Please check in console what data is sent and returned by server?


Database Update Service: How?

Posted: Fri Jan 31, 2014 2:43 pm
by Nalini

Hello, the update service is still now working. Please help