# deleteData

## Description

Delete a record from a staging database.

## Input / Parameters

| No | Name    | Description                                                                         | Data Type | Required |
| -- | ------- | ----------------------------------------------------------------------------------- | --------- | -------- |
| 1  | dataset | Name of the dataset in staging table which will be deleted.                         | String    | Yes      |
| 2  | \_id    | Value from the staging database and used for identify which record will be updated. | Integer   | Yes      |

## Output

## Callback

## Video

## Example

The user wants to delete the data from staging table.

### Step

1. Create a table with a table name and fields in staging table and create a dataset in Services. (We assumed that the table , fields and dataset have been created.)\
   table name: customer\
   Fields name: tel, name and add\
   Dataset: customer\_1\
   Set value: tel:34345678, name: 111, add:abc<br>

   ![](/files/zQeCZ8xw6hCWNQbYnp5X)
2. Call the function "deleteData", define the dataset and id.\
   dataset: customer\_1\
   \_id: 10<br>

   ![](/files/tZx35dnbDwzDXLv88wQn)
3. Call the function "loadData" and set the dataset.\
   dataset: customer\_1<br>

   ![](/files/pfV6uZeDf4hsVt2UELC0)
4. Add a console after callback for display the response from console.

   ![](/files/oT7RCLGWCYVh2iS22qBD)

### Result

![](/files/lkfWbJdjIcSK4ebAcuSf)

![](/files/upbkU4FS1lgnqgMS8OhA)\
( The result display in editor.)

![](/files/WcOaKjsTjovs5ecGrMef) ( The row for tel:34345678, name: 111, add:abc have been remove successfully.)

## Links


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/dataset/deletedata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
