ahmet Karamanli
Posts: 0
Joined: Fri Aug 08, 2014 6:47 pm

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

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,

ahmet Karamanli
Posts: 0
Joined: Fri Aug 08, 2014 6:47 pm

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

Hi Sergiy,

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

I'm looking for javascript solution.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

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

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

Duane Roderick
Posts: 0
Joined: Thu Sep 01, 2016 7:30 pm

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

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

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

To invoke any service directly from JavaScript, use:

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

Duane Roderick
Posts: 0
Joined: Thu Sep 01, 2016 7:30 pm

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

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

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

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?

saurabh8122815
Posts: 0
Joined: Mon Mar 21, 2016 5:08 am

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

Hi Duane,

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

Regards.

Return to “Issues”