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
Best Answer
-
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:
- Create a 'Delete Module' with line items per the screenshot
- 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)
- Add line item 'Delete CAI list' which drives my 'Delete from Selection' action
- 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).
- Add the action in number 2 to the monthly rollover process. This works behind the scenes so doesn't need manual updating.
- Update the UX
Module screenshot
Action Screenshot
Thanks
Wes
1
Answers
-
Hello @WesleyMiller ,
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
1 -
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.
Wes0 -
Hello @WesleyMiller ,
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
0 -
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
2 -
@WesleyMiller 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
0