Updating (increasing) assignments via batch upload

I am trying to increase the number of assignments to all interviewers of a survey after an initial assignment of only 3 interviews per interviewer (via a .tab file). Is it possible to update (increase) the number of assignments per interviewer via batch upload (using .tab file)? How so?

A direction/ help would be appreciated.

Thank you for the replies.

Unless I’m mistaken, there is no batch way to update assignment quantity (i.e., the number of interviews expected for an assignment) through the graphical user interface.

Through the interface, the process is:

  • Navigate to Survey Setup > Assignments
  • FInd an assignment of interest
  • Click on the cell in the EXPECTED column
  • Update the number of interviews expected
  • Click on SAVE

Via the API (or wrappers thereof), one can make this process faster by:

  • Collecting the ID of all assignments of interest
  • Sending a request to update the number of interviews expected, looping through all assignments of interest

Click on the ‘expected’ value to change that assignment’s size:

I don’t understand what that would be. Either what you’ve assigned was incorrect, or what you about to do is incorrect.

Please explain in the context of your survey.

So, I sent the admin a .tab file with an initial assignment of 3 interviews for each interviewer. This was meant for use during questionnaire and interviewer training session. Later I wanted to increase the assignment to each interviewer with their actual allocated data.

I went ahead and made another .tab file with the increased assignments, but these ended up as new assignments. I am new to SS and I am curious if I can use update the number of assignments without adding new ones.

Also, is there a programing interface where I can loop through assignments?

Thanks Segiy!

So, I sent the admin a .tab file with an initial assignment of three interviews for each interviewer. This was meant for use during questionnaire and interviewer training session. Later I wanted to increase the assignment to each interviewer with their actual allocated data.

I went ahead and made another .tab file with the increased assignments, but these ended up as new assignments. I am new to SS and I am curious if I can use update the number of assignments without adding new ones.

Also, is there a programing interface where I can loop through assignments?

Thanks Segiy!

Dear arthurshaw2002,

Thanks for the reply. How can I access the programing API to loop the updates through the assignments?

Thanks!

To use the API, you need an API client. For some, this might be a tool like Postman. For others, this might be an API wrapper written in a common statistical analyis language: susoapi for Stata, susoapi for R, ssaw for Python

Since I know susoapi for R best, here’s a quickly sketched solution with that tool. (Note: if you go this route, some notes in this thread might help too.)

# provide authentication
# see more here on how: https://arthur-shaw.github.io/susoapi/articles/authentication.html

# specify your workspace
my_workspace <- "your_workspace_here"

# get questionnaires
# manually, identify which one
# see more details in this thread: https://forum.mysurvey.solutions/t/getting-question-id/4267/2
qnrs <- susoapi::get_questionnaires(workspace = my_workspace)

# get all assignments
assignments <- susoapi::get_assignments(
    qnr_id = "786ed1ce-4c23-48a9-bbae-a8af2f9f44b0", # note: replace with your questionnaire ID
    qnr_version = "1", # note: replace with your questionnaire version
    workspace = my_workspace
)

# extract assignment ID for all assignments
assignment_ids <- assignments$Id

# change assignment quantity
purrr::walk(
    .x assignment_ids,
    .f = ~ susoapi::change_assignment_quantity(
        id = .x,
        workspace = my_workspace
    )
)

Thank you very much! This makes my life a lot easier.

Uploading assignments creates new assignments. This is hinted at when you are using this functionality:


If you are using a different language and the translation is missing this detail, please do let us know.

I still don’t understand. If your assignments contained actual identification of respondents, then doubling the size doesn’t make sense. If assignments don’t contain actual identification of respondents, then why create 3 per each interviewer?

If you proceed now, you will later have to separate training interviews from real interviews, which is always a fun thing to do.

A better way is to re-import a questionnaire and redo the assignments on it, and delete the old one.