# clearData

## Description

Removes the local table specified from a project.

## Input / Parameter

| Name    | Description                                     | Input Type  | Default | Options | Required |
| ------- | ----------------------------------------------- | ----------- | ------- | ------- | -------- |
| dataset | The name of the dataset to remove.              | String/Text | -       | -       | Yes      |
| extra   | Extra parameters stored and passed to callback. | Any         | -       | -       | No       |

## Output

| Description            | Output Type |
| ---------------------- | ----------- |
| Returns an empty list. | Array/List  |

## Callback?

### callback

The function to be executed if the dataset is removed successfully.

### errorCallback

The function to be executed if the dataset is not removed successfully.

## Video

Coming Soon.

## Example

The user wants to delete the dataset `lcart` from local table.

### Step

1. Create a local table `lcart`.

   ![](/files/WKMxQSBcPgA3IyMPgshR)
2. Add some fields for the table:

   ```
   item_code
   item_name
   price
   quantity
   ```

   ![](/files/ie9kjjaYrUvhaMildaD2)
3. Call the "clearData" function and define the dataset.

   ![](/files/j3hCapC5IvpIOTMegMMO)

   ```
   dataset: l_cart
   ```

   ![](/files/gnRQ29J7qzUDKncsVTYD)

### Result

![](/files/iL5FI0YJzLcwLfRdzUt0)

Before calling the `clearData` function, the dataset `lcart` exists as a local table. )

![](/files/pl3dImu0OAvLvu6gKEVQ)

After calling clearData, l\_cart no longer exists.

## 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/cleardata.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.
