AMPscript
Add
Retrieve
Rows.Add
Rows.Lookup
Rows.Remove
Rows.Retrieve
Rows.Update
Validate Your Server-Side JavaScript using WSProxy
Add a row or array of rows to the initialized data extension
Rows.Add(1)
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. |
This sample code adds multiple rows to the birthdayDE data extension.
1// Create an array that contains the rows to add.
2var arrContacts = [
3 {
4 Email: "jdoe@example.com",
5 FirstName: "John",
6 LastName: "Doe",
7 },
8 {
9 Email: "aruiz@example.com",
10 FirstName: "Angel",
11 LastName: "Ruiz",
12 },
13];
14
15// Initialize the target data extension.
16var birthdayDE = DataExtension.Init("birthdayDE");
17
18// Add the data to the data extension.
19birthdayDE.Rows.Add(arrContacts);The function returns the number of rows affected by the call.