Pete Nellmapius
Posts: 0
Joined: Thu Sep 05, 2013 1:24 pm

REST Service From Javascript to Insert a record

I know how to get data from the service's success event but how do I insert a record into an appery.io DB collection?
If I have a collection "Table1" with 2 fields
'Field1" datatype Number
'Field2" datatype Text
SQL Equivalent would be:
INSERT INTO Table1 ( Field1, Field2 ) VALUES (14, 'Some Text');

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

REST Service From Javascript to Insert a record

Hi Pete,

http://docs.appery.io/documentation/b...

You should send the following object:
code{
"Field1":"14",
"Field2":"Some Text"
}/code

Pete Nellmapius
Posts: 0
Joined: Thu Sep 05, 2013 1:24 pm

REST Service From Javascript to Insert a record

Would that then be:
restCreateService1.execute( {"Field1":"14","Field2":"Some Text"} );
I'll try that out.
Thanks for the prompt response.

Return to “Issues”