Page 1 of 1

Deleted Cases

Posted: August 29th, 2021, 8:41 am
by khurshid.arshad
Dear CSPro Team

I have deleted 1000 cases in my data file in phpmyadmin. When I synchronize data through data viewer and converted in STAT it shows deleted cases as well.

But I cannot find deleted cases in data viewer.

Please advise.
Thanks.
a.

Re: Deleted Cases

Posted: August 29th, 2021, 10:59 am
by htuser
Hi Arshad,
If you want to view deleted cases, a way is to open CSDB file in Sqlite Studio or Db Browser for Sqlite. Note that they will not open CSDBE files.
If you want to delete them (having a csdb or csdbe with only cases with deleted=0), there's at least two ways:
1.- Using sqlquery to delete where deleted=1 (only for CSDB files and using Sqlite Studio or Db Browser for Sqlite. Note also, you have to be careful since any bad manipulation will prevent the file to be opened by any CSPro tools, including DataViewer) ;
Deleted.jpg
Deleted.jpg (463.72 KiB) Viewed 2360 times
2.- Using a batch (or an entry) application. For this, one way is to put all uuid's of deleted case in a list, then in the preproc level of the application write:
PROC GLOBAL
list string
UuidsToDelete=
"bb021a7a-96e8-41fa-a88b-596e59392ef2",
"6b5d5e9f-8247-4662-be61-62910e4e1cdc",
"9989e378-70fb-4244-9299-b7090ad4d3d1";
PROC NAME_DICT_LEVEL
preproc

    if uuid
(NAME_DICT) in UuidsToDelete then
        skip case
;
   
endif;
You'll have a free deleted case CSDB/CSDBE.
Hope this help you!

Re: Deleted Cases

Posted: August 29th, 2021, 12:16 pm
by sherrell
Hi Arshad,

There are a few settings in DataViewer under the "Listing" menu item that control what you see and how it's presented (ascending/descending, etc).

Note in the "what" part your choices are All Cases, Not Deleted Cases, Partial Cases, Completed Cases.

Make sure you have "All Cases" selected.

Sherrell

Re: Deleted Cases

Posted: September 3rd, 2021, 9:48 am
by khurshid.arshad
Dear Sherrell and htuser;

Thank your for your technical input but i was doing something wrong that is why every time found duplicate cases. I will share soon.

Best regards.
a.