Deleted Cases

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
Post Reply
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Deleted Cases

Post 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.
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Deleted Cases

Post 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 2249 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!
Last edited by htuser on August 29th, 2021, 1:20 pm, edited 3 times in total.
G.VOLNY, a CSProuser from Haiti, since 2004
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Deleted Cases

Post 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
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Deleted Cases

Post 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.
Post Reply