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

# insert

## Description

Inserts values specified by the user into a local table.

## Input / Parameter

| Name    | Description                                       | Input Type  | Default | Options | Required |
| ------- | ------------------------------------------------- | ----------- | ------- | ------- | -------- |
| dataset | The name of the local table to be insert data to. | String/Text | -       | -       | Yes      |
| dt      | The values to be inserted in the local table.     | Object      | -       | -       | Yes      |
| 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 local table is updated with the new records successfully.

### errCallback

The function to be executed if the local table is not updated with the new records successfully.

## Video

Coming Soon.

## Example

The user wants to insert the id=23 into the dataset "l\_customer".

### Step

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

   ![](/files/jABIBaZWSbKI2uiyqtUl)
2. Set toObject function to dt and define the value of object.\
   dt: toObject\
   id: 23\
   code: C12345\
   name: ABC<br>

   ![](/files/ADqOI4aiq5ZQJKMN1qio)

### Result

![](/files/25Wedzsy5tjHigEadLTC) ( Before insert, the id is until id=22 )

![](/files/JjqM7PJIJUDSX9w0O13r) ( After insert, the id=23 successful add into the dataset "l\_customer" )

## Links
