UpsertDE

Overview

Updates or inserts information into a data extension as indicated by the array containing the listed column name and value pairs. This method adds the information if the data extension does not contain an applicable value or updates the existing applicable value to the new value. You can include multiple column name and value parts in a single call. You can use this method in sendable contexts, such as email messages.

Syntax

UpsertDE(1, 2, 3, 4, 5)

Function Properties

Ordinal Type Description
1 string Required Name of data extension
2 array Required Array containing column names to filter on
3 array Array containing values to filter on
4 array Required Array containing column names to include updates
5 array Required Array containing column values to update

Examples

<script runat="server">
     var rows = Platform.Function.UpsertDE("CustomerData",["ID"],["12345"],["Company","Country","Region"],["exampleCompany","USA","West"]);
</script>
Last Updated: Jun 8, 2021