# deleteBy

## Description

Removes specified records from a dataset.

## Input / Parameter

| Name     | Description                                             | Input Type  | Default | Options                          | Required |
| -------- | ------------------------------------------------------- | ----------- | ------- | -------------------------------- | -------- |
| dataset  | The name of the local table to remove the record from.  | String/Text | -       | -                                | Yes      |
| by       | The name of the field to remove the record from.        | String/Text | -       | -                                | Yes      |
| operator | The operator to use to determine the records to remove. | String/Text | =       | =, >, <, >=, <=, !=, like, ilike | No       |
| value    | The records to be removed from the local table.         | String/Text | -       | -                                | Yes      |
| first?   | ?                                                       | String/Text | -       | -                                | No       |
| extra    | Extra parameters stored and passed to callback.         | Any         | -       | -                                | No       |

## Output

| Description                                | Output Type |
| ------------------------------------------ | ----------- |
| Returns the updated local table as a list. | Array/List  |

## Callback?

### callback

The function to be executed if the specified records are removed successfully.

### errorCallback

The function to be executed if the specified records are not removed successfully.

## Video

Coming Soon.

## Example

The user wants to delete the id=7 from dataset "l\_customer".

### Step

1. Call the function "deleteBy" and define the dataset, by, and value.\
   dataset: l\_customer\
   by: id\
   value: 7<br>

   ![](/files/z2w7dXyaGfP0aVWYSjL6)

### Result

![](/files/cIiWssGRRSt7CKRzVnRe) ( Before delete, id=7 is still display in the dataset "l\_customer" )

![](/files/o1fBzh8IRa76H8mMC9ip) ( After delete, id=7 was being removed )

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