UpsertDE

Overview

Updates an existing row in a data extension for the specified number of filter columns listed in name value pairs followed by a list of columns to be updated in name and value pairs. If no data exists in that row, the function inserts a row. The function returns the number of affected rows. You can include multiple name and value pairs to build your WHERE and INSERT clauses. Use this function with email messages at send time only.

Syntax

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

Function Properties

Ordinal Type Description
1 string Required Name of data extension from which to update the specified row
2 numeric Required Number of columns used to build WHERE clause
3 string Required Column name to build WHERE clause
4 string Required Value used to build WHERE clause
5 string Required Column name to build INSERT clause
6 string Required Value used to build INSERT clause

Usage

UpsertDE('SendDE',1,'SubscriberKey',SubscriberKey,'DateSent',Now())
Last Updated: Jun 8, 2021