Rows.Add

Add a row or array of rows to the initialized data extension

Syntax

Rows.Add(1)

Properties

The Rows.Add() function has one property.

Ordinal Type Description
1 Object Required. Information to include in a row. Specify one object for each row to add to the data extension.

Usage

This sample code adds multiple rows to the birthdayDE data extension.

// Create an array that contains the rows to add.
var arrContacts = [
  {
    Email: "jdoe@example.com",
    FirstName: "John",
    LastName: "Doe",
  },
  {
    Email: "aruiz@example.com",
    FirstName: "Angel",
    LastName: "Ruiz",
  },
];

// Initialize the target data extension.
var birthdayDE = DataExtension.Init("birthdayDE");

// Add the data to the data extension.
birthdayDE.Rows.Add(arrContacts);

The function returns the number of rows affected by the call.