How to mass-delete data from a List

Hi experts,

 

Could someone give me a way to mass-delete data from a list?

There are 300,000 of product data in the L_Product, and when I try to select all and delete them, "Cannot delete over 10,000 records" error appeared.

 

Regards,

inoue

Best Answer

  • Misbah
    Answer ✓

    @Tsuyoshi_Inoue1Please use Delete from List Using Selection option.

     

    Go to Actions ->New Action->Delete from List Using Selection-> Provide the necessary info to Anaplan

     

    1. Action Name

    2. Select the List from you want to delete the list items.

    3. Select using - Select the module where you have used that particular list as a dimension.

    Thanks,

    Miz

Answers

  • Simple!

     

    Create a new module dimensioned only with the list you want to delete and create a boolean formatted line item called Delete. Set this formula to TRUE

    Then go to actions and create a new delete action. Pick the list you want to delete and the line item as the line item created above

    image.png

     

    Run the action and this will truncate the whole list

     

     

  • Hi

     

    You can use the action Delete from List Using Selection to do this.

    You can put conditions to selectively delete the items or you can mark the line item in a module with dimension of that list as TRUE to delete all the items

     

    Below is the link

     

    https://help.anaplan.com/anapedia/Content/Modeling/Build%20Models/Actions/Other_Actions/Delete_from_List_Using_Selection.html?_ga=2.233572508.300561366.1564376268-221816855.1562919871

     

    Thanks

    Akhil

  • Hi Misbah,

     

    When I  try to create a module with delete line item as Boolean and every list member is marked true to be deleted from  list , it only delete child members in the first run and I had to run it repeatedly in order to remove the parents and parents roll up for the entire list to be cleared out. Is there any alternative where the entire list could be deleted in one instance ?

  • @sirams2 

     

    That is because your list (hierarchy) is not a concatenated list, you have all levels in a single list.  Due to this and because you can only delete members at the lowest level, you will have to run it repeatedly or you can create multiple delete actions doing the same thing (deleting the lowest level), and put them all within a process.

     

    Rob

  • This is a clever trick. 

     

    I have a list, for which , the 'Delete All' where number of records is more than 40000, is just timing out. 

    The action 'Delete using a Selection' based on a property field item appeared to delete only the field item in the list ( list has Parent, Node, Code and Property). 

     

    So, I am going to try out your method.

    --bashobi

  • What do we call the module that carries the list that we use to delete?

    Any suggestions?

    System module?

    SYS05 Delete x list?