Deletion of duplicate questionnaire

Discussions about CSEntry
Post Reply
Boni
Posts: 75
Joined: February 25th, 2020, 5:53 am

Deletion of duplicate questionnaire

Post by Boni »

b]Good morning all ![/b]

I would like to know how to delete a duplicate questionnaire from my data during the collection, without directly handling the data file. What I want: write a program and insert an option in the interviewer's Menu, to allow him to delete a duplicate questionnaire just by choosing options. I know that it is possible to open the data file using "Data viewer", "text viewer" or "Bloc-Notes" then manually delete the desired data, or even use "Index files" of CSPro , to check for duplicates and then delete. I think all of these procedures only work on the computer. I have read various concerns on the subject, but I think the solution to my problem is not there.
I have already planned a "CSindex" application to check for duplicates, another to report: display the IDs of the duplicate questionnaires as well as the other informations necessary to identify them. My current problem is how to design an program or Index application that can allow an interviewer to be able to automatically delete a precise questionnaire, just by using his Menu (on Computer or Android), so as not to take the risk of allowing an inexperienced individual to manipulate the data file. For my part, I think it is too risky to manually manipulate the data file even less by someone who is not experienced in the matter.

Hoping for your help on this subject, thank you in advance !!!

cordially
Sincerely yours !
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Deletion of duplicate questionnaire

Post by Gregory Martin »

There's not really a way to do this using CSPro 7.3. If you can wait until CSPro 7.4 comes out, you can use new functionality to delete duplicates in logic.
// determine what you want to delete, and instead of using the key, get the case's UUID;
// the UUID is a unique identifier for a case, whereas the key will exist multiple times
// for duplicate cases
string key_to_delete = key(MY_DICT);
string uuid_to_delete = uuid(MY_DICT);

// this would be a problem because it will always delete the first case with that key
delcase(MY_DICT, key_to_delete);

// so instead, with CSPro 7.4, you can load the case using the UUID
locate(MY_DICT, uuid, uuid_to_delete);
retrieve(MY_DICT);

// and then delete it ... in CSPro 7.4, this will delete the currently loaded case
delcase(MY_DICT);
Unfortunately, this won't even work with the beta version that is currently on our website. If you wait a couple days, we'll put out a new beta and you can use the above code to delete duplicates.
Boni
Posts: 75
Joined: February 25th, 2020, 5:53 am

Re: Deletion of duplicate questionnaire

Post by Boni »

Super !!!! I look forward to the release of version 7.4
really thank you
Sincerely yours !
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Deletion of duplicate questionnaire

Post by Gregory Martin »

Just so you know, we did put up a new beta yesterday: https://www.csprousers.org/beta/

That code I sent will work on that version.
Yass
Posts: 103
Joined: November 11th, 2017, 1:26 am

Re: Deletion of duplicate questionnaire

Post by Yass »

Hi Greg , the beta 7.4 does not support csweb 6.2, the dictionary cannot be uploaded. I have small pilot survey am working I would love to use the csweb.

Thanks
Boni
Posts: 75
Joined: February 25th, 2020, 5:53 am

Re: Deletion of duplicate questionnaire

Post by Boni »

It's really wonderful !!!

I've already downloaded this Beta version, as well as Android version, I will get very soon working on that, and
i will get back to you.

I have two small questions, if you would like:

1. I have a logical file (APP file) with the extension ".APP" [/b realized a long time ago, which I still use as an attachment file. Other files (LST, MSG file and Others) were lost. Then I would like to know if there is a way to open this file or having access to the logic contained in this file by other means?

2. I would also like to know whether there is an opportunity to uncompress a (.pen) file recover the logics, edit it, whether the original files are lost?

thank you for everything
Sincerely yours !
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Deletion of duplicate questionnaire

Post by josh »

You can open the .app file in any text editor. It contains the CSPro logic.

There is no way to get the logic from a pen file.
Boni
Posts: 75
Joined: February 25th, 2020, 5:53 am

Re: Deletion of duplicate questionnaire

Post by Boni »

Thank you very much. It is a great pleasure to work with CSPro :P
Sincerely yours !
Boni
Posts: 75
Joined: February 25th, 2020, 5:53 am

Re: Deletion of duplicate questionnaire

Post by Boni »

It is also reassuring, that no one can afford to manipulate my programs when I copy my PFF and PEN files on tablet, Android or computer during a data collection.
Sincerely yours !
Post Reply