We have an email validation process that checks a list ID for an email in order to validate if that person has already signed up. Currently the only way I know to automatically populate that list is:

Query to DE > Data Extract of DE > File Export > File import to list.

The problem I have now is the file import to the list can't be set to overwrite, the only option is add, update or add/update. I need this process to overwrite the list daily in order to have accurate daily records to validate. Records can change daily from active to inactive.

Two questions: Is there a better process I can use that will overwrite the list? Is there a script I can run that will clear the DE before the list import?


  • Can you define what "DE" means in this context?
    – nbrown
    Feb 21, 2019 at 21:55
  • 1
    Yeah I would have thought it stood for Data Extract but then you say Data Extract of DE so, I am confuse.
    – Adrian Larson
    Feb 21, 2019 at 21:57
  • a data extension in marketing cloud Feb 21, 2019 at 21:57
  • Just curious, but why do you need to overwrite the list if the validation is just checking if they signed up already. Wouldn't you want to retain ALL records in the list that have signed up, not just the most recent? Feb 22, 2019 at 13:49
  • In the case of someone who signed up then removed themselves and then wanted to sign up again. Feb 22, 2019 at 19:55

1 Answer 1


You can run this script to clear a list:

<script runat="server">
 var  myList = List.Init("external key here");
 var listFields = myList.Subscribers.Retrieve();
 var listFieldsLength = listFields.length;
 if (listFieldsLength > 0) {
    for (var i = 0; i < listFieldsLength; i++) {
      var subObj = Subscriber.Init(listFields[i].SubscriberKey);
      var status = subObj.Remove();

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .