--- title: "Create Rows" url: https://docs.catalyst.zoho.com/en/sdk/flutter/v2/cloud-scale/data-store/create-rows/ description: "You can create a new row instance for a particular table in the Data Store, and enable the methods defined in this class to access the instance object." last_updated: 2025-11-19T15:07:41Z service: Cloud Scale type: general related_links: - name: "Data Store" url: /en/cloud-scale/help/data-store/introduction - name: "Records" url: /en/cloud-scale/help/data-store/records - name: "Insert Row - API" url: /en/api/code-reference/cloud-scale/data-store/insert-new-row/#InsertNewRow --- # Create Rows ### Create a Single Row You can create a new row in a [Data Store](https://docs.catalyst.zoho.com/en/cloud-scale/help/data-store/introduction) table of the given instance using the `newRow()` method. You must set the values of the rows in the table, by specifying the column name and the corresponding row value as a key-value pair. The `<ROW_INSTANCE>` used in the code syntax below is the instance defined in the [Row Instance page](https://docs.catalyst.zoho.com/en/sdk/flutter/v2/cloud-scale/data-store/create-row-instance). ```bash Future<(APIResponse, ZCatalystRow)> <ROW_INSTANCE>.create() ``` > **Note:** If a column was created with the `is_unique` or `is_mandatory` property enabled, you must ensure that the value is unique or is mandatorily passed, respectively. You must also ensure that the data you pass for a column is of the column's configured data type. A sample code snippet with creating a row instance is shown below: ```bash var row = ZCatalystApp.getInstance() .getDataStoreInstance() .getTableInstance(identifier: 'Products') .newRow(); //Defining the row instance for the table and passing the key-value data for the row row.setColumnValue('product_name', 'power_bank'); row.setColumnValue('product_price', 2000); row.setColumnValue('product_quantity', 2); try { var (response, row) = await row.create(); print('New row created successfully : ${row.id}'); } on ZCatalystException catch (ex) { print('Failed to create the row: $exception'); } ``` ### Create Multiple Rows Catalyst Flutter SDK enables you to create multiple rows at a time in a table of the given instance. This is done by passing a list containing the rows that need to be inserted in the table. The list is passed as an argument to the `createRows()` method, as shown in the code syntax below. The `<TABLE_INSTANCE>` used in the code below is the instance defined in the [Table Instance page](https://docs.catalyst.zoho.com/en/sdk/flutter/v2/cloud-scale/data-store/create-table-instance). ```bash Future<(APIResponse, List<ZCatalystRow>)> <TABLE_INSTANCE>.createRows(List<ZCatalystRow> rows) ``` **Parameters**: * `rows`: The array of rows to be created A sample code snippet with creating row instances is shown below: ```bash List<ZCatalystRow> newRows = []; //Create an array //Define row instances for rows to be created ZCatalystRow row1 = dataStore.getTableInstance(identifier: 'Products').newRow(); row1.setColumnValue('product_name', 'a'); row1.setColumnValue('product_price', 25); row1.setColumnValue('product_quantity', 50); ZCatalystRow row2 = dataStore.getTableInstance(identifier: 'Products').newRow(); row2.setColumnValue('product_name', 'b'); row2.setColumnValue('product_price', 30); row2.setColumnValue('product_quantity', 40); ZCatalystRow row3 = dataStore.getTableInstance(identifier: 'Products').newRow(); row3.setColumnValue('product_name', 'c'); row3.setColumnValue('product_price', 25); row3.setColumnValue('product_quantity', 70); //Add row instances to the array newRows.add(row1); newRows.add(row2); newRows.add(row3); try{ var (response, rows) = await dataStore.getTableInstance(identifier: 'Products').createRows(rows: newRows); for (var row in rows) { print(row.id); //Actions to be executed upon a successful creation of the rows } } on ZCatalystException catch (ex) { print('The IDs of the rows that were successfully created are listed below:') } ```