Page 1 of 1

With javascript: How to delete a one specific record from the database

Posted: Thu Oct 08, 2015 8:11 pm
by ahmet Karamanli

Hi,
I want to delete a one row in the database with javascript: how do I do that?

As example I use:
Products_update.execute({body: {where: {ItemIDToUpdate: "8712566378614"}, operations: {$set: {ColumnX: varX} } } });

Where I can set a value in a cloumn X : "ColumnX": at row with ItemIDToUpdate equal to: 8712566378614,

The same question again now for deletion:
I want to delete a row with arow element "ItemIDToDelete equal to "8712566378614"

Can I use:

Code: Select all

Products_delete.execute({body: {where: {ItemIDToDelete: "8712566378614"}, operations: {$delete: {ColumnX: varX} }  } }); 

????

and same question if I want to ADD a Item, can I use :

Code: Select all

Products_create.execute({body: {where: {ItemIDToCreate: "8712566378614"}, operations: {$set: {ColumnX: varX} }  } }); 

Thanks,


With javascript: How to delete a one specific record from the database

Posted: Thu Oct 08, 2015 8:35 pm
by Serhii Kulibaba

Hello Ahmet,

Please look at this documentation: https://devcenter.appery.io/documenta...


With javascript: How to delete a one specific record from the database

Posted: Fri Oct 09, 2015 8:34 pm
by ahmet Karamanli

Hi Sergiy,

So far I can see you can't use CURL commands in javascript is that correct?.

I'm looking for javascript solution.


With javascript: How to delete a one specific record from the database

Posted: Fri Oct 09, 2015 11:09 pm
by Illya Stepanov

Execute your delete service using JavaScript and pass object id with it -- https://devcenter.appery.io/documenta...


With javascript: How to delete a one specific record from the database

Posted: Thu Sep 01, 2016 7:30 pm
by Duane Roderick

Every answer for support redirects back to the appery site, but no examples are provided. This is frustrating.


With javascript: How to delete a one specific record from the database

Posted: Fri Sep 02, 2016 1:30 pm
by Illya Stepanov

To invoke any service directly from JavaScript, use:

precode
serviceInstanceName.execute({});/code/pre


With javascript: How to delete a one specific record from the database

Posted: Fri Sep 02, 2016 4:34 pm
by Duane Roderick

Thanks, but this doesn't answer how to delete a record on the gui.


With javascript: How to delete a one specific record from the database

Posted: Mon Sep 05, 2016 3:55 pm
by Serhii Kulibaba

Please look at this detailed example how to send parameters to the service with JS code: https://devcenter2.appery.io/document...

Could you clarify what you have tried and what exactly does not work?


With javascript: How to delete a one specific record from the database

Posted: Tue Sep 06, 2016 11:54 am
by saurabh8122815

Hi Duane,

For delete record,you can use other solution,
like use server code service for delete record in database.

Regards.