> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/dataset/cleardata.md).

# 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
