I have a problem with OrgUnits, I want to delete a OrgUnit that no longer serves in the system but I know that this message which appears OrgUnit means that this is linked to the data but as I made my manipulations front end, and I am obliged to remove, then how?
Hi Carlos,
The only real way to do this at the moment is to remove the data values from the database with SQL.
So, something like
DELETE FROM datavalue where sourceid = XXXXX;
where XXXXXX is the organisationunitid of the orgunit you wish to delete.
This statement will permanently delete all data associated with the orgunit you wish to remove.
Just be sure, obviously, to ensure you have a backup of your database, and that the SQL which you develop actually does what you want it to!
Regards,
Jason
···
On Mon, Jun 15, 2015 at 12:23 PM, Carlos Nyembwe nyembwe@gmail.com wrote:
Hi all,
I have a problem with OrgUnits, I want to delete a OrgUnit that no longer serves in the system but I know that this message which appears OrgUnit means that this is linked to the data but as I made my manipulations front end, and I am obliged to remove, then how?
hi Carlos
the orgunit or are trying to delete has some data (is associated with some data). It may not be a good idea to delete anyway. I'd recommend that you just close the facility so that you can still use the legacy data associated with it later. To do this you can open the facility and edit and insert 'closing date'. hope you find this to be useful.
"For God is not unrighteous to forget your work and labour of love..."
···
--------------------------------------------
On Mon, 6/15/15, Carlos Nyembwe <nyembwe@gmail.com> wrote:
Subject: [Dhis2-users] Deleting OrgUnit
To: "dhis2-devs" <dhis2-devs@lists.launchpad.net>, "dhis2-users@lists.launchpad.net" <dhis2-users@lists.launchpad.net>
Date: Monday, June 15, 2015, 12:23 PM
Hi all,
I have a problem with OrgUnits, I want to
delete a OrgUnit that no longer serves in the system but I
know that this message which appears OrgUnit means that this
is linked to the data but as I made my manipulations front
end, and I am obliged to remove, then how?
who can help me on this?
thank you
On Mon, Jun 15, 2015 at 12:23 PM, Carlos Nyembwe nyembwe@gmail.com wrote:
Hi all,
I have a problem with OrgUnits, I want to delete a OrgUnit that no longer serves in the system but I know that this message which appears OrgUnit means that this is linked to the data but as I made my manipulations front end, and I am obliged to remove, then how?
I have a problem with OrgUnits, I want to delete a OrgUnit that no longer serves in the system but I know that this message which appears OrgUnit means that this is linked to the data but as I made my manipulations front end, and I am obliged to remove, then how?