Register

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

CommunityMember131786
Occasional Contributor

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

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

Wesley Miller
6 REPLIES 6
ArunManickam
Master Anaplanner/Community Boss

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

Hello @CommunityMember131786 ,

 

Yes, possible.

 

Create two booleans lineitems dimensioned on the list.

 

Mark for deletion - User Input

Valid for deletion - TRUE if "Marked for deletion" and "No data in versions"

 

Compute the "Valid for deletion" using logic that there is no data in any version. 

Delete the member using "Valid for deletion" line item

 

Thanks

Arun

 

CommunityMember131786
Occasional Contributor

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

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 

Wesley Miller
ArunManickam
Master Anaplanner/Community Boss

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

Hello @CommunityMember131786 ,

 

There is no easy way out.

 

I will find out all line items with no formula dimensioned by this list, and check their total (assuming numeric values) > 0, if yes, there is data.

 

Thanks

Arun

rob_marshall
Moderator

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

@CommunityMember131786 

 

Not the exact use case, but I would look into creating a LISS based off the versions + a Total where the total adds up up the version "line items".  That way, you can now just look at the "Total" version to see if it has any data.  Take a look at this article on Dynamic Version Analysis, paying close attention to the beginning part in creating the LISS.

 

https://community.anaplan.com/t5/How-To/Variance-Analysis-With-Native-Versions-Made-Easy/ta-p/98336

 

Rob

alexpavel
Certified Master Anaplanner

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

@CommunityMember131786  as you already noticed, the way to do it is to create a boolean line-item where to check if there are data related to that element or not. 

 

The idea is to have in the system module related to GL Accounts a boolean line-item which reference ALL the modules where GL Accounts list is used to store data...

 

In order to check if data exists on all versions you will need to use the SELECT statement per every Version similar to this:

 

Line-item[SELECT: Versions.Actual] <> 0 or Line-item[SELECT: Versions.Budget]<>0 or Line-item[SELECT: Versions.Forecast]<>0

 

Hope it helps

Alex

CommunityMember131786
Occasional Contributor

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

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

 

 

Wesley Miller