Delete from list: but first check if any values in versions

Options
WesleyMiller
WesleyMiller Member, ALL USERS, Partner, Community Member, Certified Model Builder Posts: 5 Occasional Contributor

Hi, 

 

I am looking to create an action that uses the 'Delete using Selection' action functionality. However I only want the user to be able to delete if there is no data against the list item in any version. 

 

Is there a specific way of doing this in Anaplan?

 

eg I have a list of GL codes. At some point some of these GLs will no longer be in use and as part of a clean up I want to check if they have any data in any version before deleting them from the list. 

 

Thanks,

Wes

Comments

  • WesleyMiller
    WesleyMiller Member, ALL USERS, Partner, Community Member, Certified Model Builder Posts: 5 Occasional Contributor

    Thanks.

     

    The above is what was I was going to do, but I am more interested in what the logic is to do the "using logic that there is no data in any version" part.

     

    Apologies, I should have been more specific.


    Wes 

  • WesleyMiller
    WesleyMiller Member, ALL USERS, Partner, Community Member, Certified Model Builder Posts: 5 Occasional Contributor

    Thanks all.

     

    I looked into the IF statements for checking the dimensions, but felt this fell into the realms of 'hard coding'. Ie having to update the formula if any new versions are added. In order to keep it dynamic I have avoided formulas and opted for an action instead. 

     

    My solution for anyone in the same boat:

    1. Create a 'Delete Module' with line items per the screenshot
    2. Create an action that pulls in all dimension data to the one line item 'Value in Version'. (Anaplan aggregates data when loaded via an import)
    3. Add line item 'Delete CAI list' which drives my 'Delete from Selection' action
    4. Add a DCA line item to hide unavailable options for the end user. (Which I will put in a proper best practice DCA system module).
    5. Add the action in number 2 to the monthly rollover process. This works behind the scenes so doesn't need manual updating.
    6. Update the UX

    Module screenshot

    CommunityMember131786_0-1619799713762.png

     

    Action Screenshot

    CommunityMember131786_2-1619800605836.png

     

    Thanks

    Wes