DeleteData

Deletes information from a data extension as indicated by the array containing the listed column name and value pairs. You can include multiple column name and value pairs in a single call. You can use this method in non-sending contexts, such as landing pages.

note: This function times out if it runs for too long. The maximum number of rows that you can delete depends on the size of the data extension, system load, and other factors. For large deletion requests, we recommend that you implement a batching process.

Syntax

Platform.Function.DeleteData(1, 2, 3)

Function Properties

Ordinal Type Description
1 String Required. The name of data extension that contains the rows you want to delete.
2 Array Required. The columns to search for the specified values.
3 Array Required. The field values used to determine which rows to delete.

Example

This example deletes all rows in the MembershipRewards data extension where the value in the Area column is Kensington.

<script runat="server">
  var rows = Platform.Function.DeleteData('MembershipRewards',['Area'],['Kensington']);
</script>
<p>Rows deleted: <ctrl:var name="rows" /></p>

The only item in the response is the number of rows that were modified.