Forum Discussion

JoelBeh's avatar
JoelBeh
New Contributor II
5 days ago

Clear ALL Data related to a specific Member.

Hello everyone, 

I'm just wondering if there's a method or a way to delete ALL Data with a click of a button.

I know about data management steps and the use of it along with the finance BR.

So my concept and idea is that, I allow the user to select the member (step 1) or list of members (if step 1 is good). Then the user can click one button to delete all data. Why I want to do this is because let say the user want to delete a certain member, it will be easier for the user to do so.

I tried to retrieve all the cubes that I have in the application and changing it via the scriptbuilder/databuffer method and setting the cell to 0 but the concept of DataUnit do not allow us to do so. Thus, I am here seeking for guidance and wisdom from the community. :)

Thanks! 

1 Reply

  • rhankey's avatar
    rhankey
    Contributor III

    By design, there is no convenient out of box way to clear all the data for a specific member or members, so you could let's say delete the member(s).  The reason for this I would speculate is because doing so is very dangerous and breaks OS's attempt to maintain data integrity.

    However, it's fairly easy to write a business rule to accomplish this if you truly need to do so.  For each Cube Data Unit containing values in the member(s), you need to replace the values for those members with a cell status of IsNoData=True, IsValid=False.  That will zap Cube data that came from Stage, Forms or Journals and Calculated data.  If the goal is to be able to delete the member(s), you also need to zap the data in Stage, Journals & Annotations containing the member(s) too.  Clearing Imported, Forms and Journal data from the Cube, Stage, Annotations and Journal tables in such a manner can circumvent Certifications, Locks, enforcing balanced journals, etc that the majority of OS users expect of the product.  And if someone accidentally chooses the incorrect member to clear-out, you are almost certainly going to need to roll back the database, which means rolling back what everyone else was doing too.

    Do you get the sense such a tool is quite dangerous?  I keep such tools rather far out of reach, even from Admins.