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

# insertData

## Description

Insert or add value in a staging database.

## Input / Parameters

| No | Name    | Description                                                              | Data Type | Required |
| -- | ------- | ------------------------------------------------------------------------ | --------- | -------- |
| 1  | dataset | Name of the dataset in stagging table where the record will be inserted. | String    | Yes      |
| 2  | param   | Object name                                                              | Object    | Yes      |

## Output

## Callback

## Video

## Example

The user wants to insert the data into staging table.

### Step

1. Create a table with a table name and field in staging table.\
   table name: customer\
   Fields name: tel, name and add

   ![](/files/kjllACjgXz2w130PDYer)

   ![](/files/7U83CD1ZlghiXciJI3lu)
2. Create a dataset is in Services.\
   dataset: customer\_1<br>

   ![](/files/vEGIjUAmR8VpLYwdBevx)
3. Call the function "insertData", define the dataset and set function "toObject"to param.\
   dataset: customer\_1\
   param: toObject<br>

   ![](/files/DogF19LaT7IwDJ3X8uR2)
4. Define the tel, name and add.\
   tel: 34345678\
   name: 111\
   add: abc<br>

   ![](/files/dbcNwQ2iayxfOdoFh6Yl)
5. Call the function "loadData"and define the dataset.\
   dataset: customer\_1<br>

   ![](/files/IFbO4N53B8EN70FFkKPI)
6. Add a console after callback for display the response from console.

   ![](/files/b7zHMCr5y303i5wJD7Z0)

### Result

![](/files/Mjy5XnhYG93lKoXGjvqz)

![](/files/8uta2vgiRnGw8OFZLr9e)

## Notes

* N/A
