Rows.Update
Updates field values in a specified data extension row.
Rows.Update(1, 2, 3)
Ordinal | Type | Description |
---|---|---|
1 | Object | Required. An object that contains the data to insert. For each item in the object, the key is the name of the column to update, and the value is the value to update in the specified column. |
2 | Array | Required. An array of strings that lists the columns to search for a matching value. |
3 | Array | Required. An array that lists the values to find in the columns listed in the second ordinal. You must specify one value for each column listed in the second ordinal. |
This code example instantiates a data extension named "NTO Customer List". It then uses the Update()
function to locate a row in the data extension where the value of the MemberId
field is 9868600 and the value of the Country
field is "CA". If it locates a matching row, the function updates the StateProvince
field to contain the value "QC" and updates the PreferredActivity
field to contain the value "Sailing". If the function doesn’t find a row that matches both of the specified criteria, it returns an error.