Deleting a questionnaire

Dear Support,

We are preparing for data collection in 2 days and when preloading the 16,000+ assignments, I noticed that Unicode did not appear well on the dashboard. This is because I did not set the preloading .tab file in the correct encoding format. I fixed two small errors in my system in Designer, fixed the .tab file to display Khmer Unicode and deleted the old questionnaire version (version 9) with thousands of wrong assignments. I imported the new questionnaire (version 10) and successfully preloaded all assignments with Khmer Unicode now displaying well. But I noticed that the old questionnaire (v9) is still there with all corresponding assignments and I am worried that it may display on enumerators’ tablets or supervisors’ dashboards. Is it just a matter of time before it disappears from the list of questionnaires?
Thanks a lot.


Unfortunately, I’ve not dealt with this problem before personally. My expectation, like yours, is that assignments would be deleted when the questionnaire is.

Here are a few quasi-educated answers.

First, check whether the assignments are archived. If so, they should not appear on the interviewer tablets.

Second, if you need a mechanism to bulk delete/archive assignments, consider using an API wrapper: for example, susoapi for Stata, susoapi for R, ssaw for Python.

Since I know susoapi for R best, here’s how you might accomplish this task with that tool

Of course, there’s some initial setup–particularly if you don’t have R on your computer–for example, installing R, installing RTools (if you’re on Windows), and installing required packages.

After setting up R, use the following code:

# if you don't have them, download a few packages
# to do so, remove the comment from the 3 lines below and execute the installation commands
# install.packages("devtools")
# devtools::install_github("arthur-shaw/susoapi")
# install.packages("purrr")

# load necessary packages

# get questionnaires
qnrs <- susoapi::get_questionnaires(workspace = "primary") # note change your workspace as needed

# open questionnaires, identify yours, and collect the questionnire ID and version

# get assignment details
assignments_details <- susoapi::get_assignments(
    qnr_id = "1160e04b0aa74c7faa0ce7b792aba87a", # replace with your questionnaire GUI
    qnr_version = 1, # replace with your version numbers
    workspace = "primary" # replace with your workspace

# strip out assignment ID for such cases
assignments <- assignments_details$Id 

# archive problem assignments
archived_assignments <- purrr::map_lgl(
    .x = assignments,
    .f = ~ susoapi::archive_assignment(
        id = .x, 
        verbose = TRUE,
        workspace = "primary" # replace with your workspace

# check whether any assignments failed to be archived
any(archived_assignments == FALSE)

See here:Deleting a survey

Deleting a questionnaire may take a considerable time depending on the size of the survey and server performance. While the survey is being deleted its questionnaire still appears in the list of imported questionnaires in the disabled state, such as ‘Census 2020 v2 ’ in the following illustration. The questionnaire is automatically removed from the list when the deletion process completes.

1 Like

Dear Sergiy,
Thank you. I guess we will have to wait…

Dear Arthur,
I am not familiar with the API capabilities of SuSo. I will inquire into you solution though, thanks a lot.



Well, if the deletion continues for days, then something is wrong.
Do you at least see the survey BEING deleted?
(note how it is shown differently in the screenshot in the above mentioned article.)

Yes, I can see the questionnaire being deleted.

And it seems like we can apparently not re-assign any cases from that deleted old version (v9) to anybody, which is good: there is no message, but when trying to re-assign, the process seems to get “stuck” (it does not complete and the cases are not getting re-assigned).

I warned all supervisors this morning to filter by questionnaire version and use v10 only. I will get back to you if nothing changes by tomorrow.

Dear Sergiy,

As of today 12 Jan, the questionnaire has still not been deleted. Again, this is a bit confusing to the supervisors (I need to constantly remind them to select v10 only) but I can see that we cannot re-assign cases from the old version, so there is no damage for now. I should probably have only uploaded one case for testing, instead of all 16,572! No wonder why it may take some time to delete them all!

Hello @benj ,

version 20.10 of Survey Solutions contained a revision of code to speed up questionnaire deletion.

If you are using an earlier version, please update.

16,000 is definitely not large enough to be overwhelming. The above-mentioned optimization was undertaken after clients reporting issues with deletion of surveys involving several millions of actually collected interviews. It all depends on the server of course, but it shouldn’t take days.

I’d recommend to inspect the server logs to see if there were any errors reported in the process of deletion.

Hi Sergiy,

Thanks for the heads-up on 20.10. Our survey is now ongoing and we are using v21.09.2. I believe that updating the server also implies to update the interviewer app on all tablets, right? I know this is not ideal but I think that we will keep going with our current version: I installed an app block on all 350 tablets so enumerators could not change the settings. The inconvenient is that they can’t update the Interviewer app too obviously. Updating the app implies to give enumerators the password for the app lock, which then will open doors to them installing non-work related apps and using the tablet for personal use, which will then cause so many additional issues. In short, as long as they use v10 and cant use v9 (because they can still not assign any of the cases), I’m ok.


Cannot help with updating the tablets, but keep in mind this alert:

Dear Sergiy,

When you mentioned in your previous message to inspect the server logs, do you mean the audit log that you can check from the workspace screen when clicking on the concerned workspace? If so, then see it attached (converted to pdf).

audit_log.pdf (405.5 KB)

We believe we are also experiencing some issues with our AWS instance, currently being investigated. These issues are causing synchronization troubles: yesterday, some rejected interviews got corrected, completed, but could not be synced back to the server. A basic server reboot apparently fixed the issue. But this is not the first time it happens and AWS support is now trying to understand what is going on.

No. The exceptions log, see Data Server Errors.