Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Empty List

Ritu21
Level 1
Level 1

Hi Team,

 

Please let me know how can we empty the List after delivery activity.

We are updating the list with 3 days record so "Purge and re-use the list" checkbox is unchecked. 

Our goal is to empty the records in the list once delivery is performed.

 

Please help me with this.

Thanks in advance. 🙂

1 Accepted Solution
Darren_Bowers
Correct answer by
Community Advisor
Community Advisor

So am posting up the answer that helped @Ritu21 

This is my actual workflow that does this:

Darren_Bowers_3-1604440887161.png

The first two steps are self-explanatory. The query is just querying the same record set for 0 records, but I also put all the additional data onto the schema that came off the schema when I first loaded it. I think this is so the new List has the exact same structure as the old list. Make sure you put the targeting dimension on there too.

Darren_Bowers_4-1604441000405.png

Then I just save the new list as the same name as the old list

Darren_Bowers_5-1604441094112.png

Cheers

Darren

View solution in original post

8 Replies
wodnicki
Community Advisor
Community Advisor

Hi,

 

Follow these steps:

  1. Create a workflow with external signal pointing to a js activity pointing to an end block
  2. In the js:
    1. Use nms.delivery.get(vars.deliveryId) to get the delivery contents
    2. Parse the contents for the target population's group id(s)
    3. Delete all the rows for group(s)
  3. Set the external account of the deliveries to use that workflow for post-processing

 

Might also be able to accomplish above without js, using $long(vars/@deliveryId) in a query activity; not so sure about parsing the target for the group id(s) without js though.

 

Thanks,

-Jon

Darren_Bowers
Community Advisor
Community Advisor

Hi @Ritu21 - the answer that @wodnicki gave is definitely one way to do it. I found another easy way to do it - just query the List for 0 records then save the List again. It preserves the List schema and purges the list by saving 0 records to it. The query just asks for records where the primary key is empty and the Update List just has the Purge List checkbox ticked.

Darren_Bowers_0-1603147401540.png

 

Ritu21
Level 1
Level 1

Hi Darren,

Thank you for the reply.

 

I tried to do that but getting 0 record.

filtered List internal name  and then added query primary key is empty. I am getting 0 records and didn't worked. Could you please let me know where I'm going wrong

 

Ritu21_0-1603199908652.png

 

 

Darren_Bowers
Community Advisor
Community Advisor
Hi @Ritu21 - You might need to do a quick load of the List before the query step. This is so you have the actual List schema in the workflow. So the steps would be: Load List > Query 0 records > Save List. This should get you an empty List with the correct schema. Cheers Darren
Ritu21
Level 1
Level 1

Hi Darren,

I have loaded the list and filtered the data based on primary key as 0.
While clearing the list, I am not getting the list which I have created to delete.
After going through the same, I found that the list whose schema type is "List Of recipient" will only be visible.

Could you please let me know how can I make the schema type as "List Of recipient".
Currently the schema type of the list which I have created is "Recipient" and List type is  "List" not "Group"

List name which I have created : Post Expiration Friday List

Ritu21_0-1603876403376.png

 

While clearing the list : "Post Expiration Friday List" is not coming

Ritu21_1-1603876499921.png

 

 

Ritu21_0-1603876847100.png

 

 

 

 

 

 
 

 

 

 

 

 
 

 

 
 

 

 

 

 

Sukrity_Wadhwa
Employee
Employee

Hi @Ritu21,

Were you able to resolve this query with any of the given solutions? Do let us know.

Thanks!

Ritu21
Level 1
Level 1

Hi Sukrity,

Thank you for your concern.
I was unable to solve that.

Have asked for the same again.

 

Darren_Bowers
Correct answer by
Community Advisor
Community Advisor

So am posting up the answer that helped @Ritu21 

This is my actual workflow that does this:

Darren_Bowers_3-1604440887161.png

The first two steps are self-explanatory. The query is just querying the same record set for 0 records, but I also put all the additional data onto the schema that came off the schema when I first loaded it. I think this is so the new List has the exact same structure as the old list. Make sure you put the targeting dimension on there too.

Darren_Bowers_4-1604441000405.png

Then I just save the new list as the same name as the old list

Darren_Bowers_5-1604441094112.png

Cheers

Darren

View solution in original post