> 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/updatebymulti.md).

# 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
