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 '19 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 '19 at 21:57
  • a data extension in marketing cloud – Daniel Smith Feb 21 '19 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? – Gortonington Feb 22 '19 at 13:49
  • In the case of someone who signed up then removed themselves and then wanted to sign up again. – Daniel Smith Feb 22 '19 at 19:55

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();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.