Page 1 of 1

update fields

Posted: Wed Oct 23, 2013 10:49 am
by Johnny

Hi there

I created a update service and I map the fields like this:
Image

On the ERROR event I put this code:
alert("Error. Please contact us with this number e-11");

So now I keep getting error on update.

My ideal code must check if fields are empty if it is empty it must create a new row in collections.

If there is something it must update.

But if you can help with the update I would really appreciate it!


update fields

Posted: Wed Oct 23, 2013 11:11 am
by Maryna Brodina

Hello! Do you use any code to check if the field is empty? Could you post it? Are there any errors in console when you invoke service?


update fields

Posted: Wed Oct 23, 2013 11:59 am
by Johnny

no errors and all the fields do have a value in them.


update fields

Posted: Wed Oct 23, 2013 12:29 pm
by Maryna Brodina

Could you clarify when you want to make update (and what field should be updated) and when you want to create new record? By the way most likely you recieve this error while update because you didn't map object_id


update fields

Posted: Wed Oct 23, 2013 12:34 pm
by Johnny

"By the way most likely you recieve this error while update because you didn't map object_id"

Ok what must map to object_id


update fields

Posted: Wed Oct 23, 2013 1:15 pm
by Maryna Brodina

id of object you want to update. Please check out tutorials http://docs.appery.io/documentation/b...
http://docs.appery.io/tutorials/build...