# updateByMulti

## Description

Updates records from multiple fields in a dataset.

## Input / Parameter

| Name     | Description                                             | Input Type  | Default | Options | Required |
| -------- | ------------------------------------------------------- | ----------- | ------- | ------- | -------- |
| dataset  | The name of the local table to update the records from. | String/Text | -       | -       | Yes      |
| first    |                                                         | String/Text | -       | -       | No       |
| filter   | The filters for the field and value to update.          | Array/List  | -       | -       | Yes      |
| orFilter | Additional filters for the field and value to update.   | Array/List  | -       | -       | No       |
| data     | The data to update the records with.                    | Object      | -       | -       | Yes      |
| extra    | Extra parameters stored and passed to callback.         | Any         | -       | -       | No       |

## Output

| Description                                               | Output Type |
| --------------------------------------------------------- | ----------- |
| Returns the updated list of records from the local table. | Array/List  |

## Callback

### callback

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

### errorCallback

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

## Video

Coming Soon.

## Example

The user wants to update the name from ABC to A1A2A3A4 and tel from 1234567 to 1111111111 in dataset "l\_customer".

### Step

1. Call the function "updateByMulti" and define the dataset.\
   dataset: l\_customer<br>

   ![](/files/jzNNGyjdPkZPFlZw9nLg)
2. Set toArray and toObject function to filter and define the value of object.\
   filter: toArray --> toObject\
   id: 25\
   code: C12345<br>

   ![](/files/akUm6B45XTH6gEEYnMQD)

   ![](/files/EKAZfujdDpuYj2OYRDkQ)

   ![](/files/OV6S45qiQZfEh3tHrNkf)
3. Set toObject function to data and define the value of object.\
   name: A1A2A3A4\
   tel: 1111111111<br>

![](/files/gSNdppdQf0CegmM0vPVS)

### Result

![](/files/XKOInSNtnQ2EogUfhVK0) ( Before update, the name is ABC and tel is 1234567 )

![](/files/kssikapiCthynoAFLORH) ( After update, the name changed to A1A2A3A4 and tel is 1111111111 )

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