[Solved] Quota/limit on Questions?


Is there a way to set a quota/limit on the number of responses to a question? That is, once the question has received 100 responses, for example, the question is hidden or disabled and no longer visible to respondents.


Nick Wicks asked

    Best answer


    I ended up figuring out how to do this using a simple custom script (anyone should be able to implement this).

    I created a blank hidden variable (ID: 5, in this case) and then created a custom script that basically said “fill the hidden variable with the response count of question ID 2” (my question’s ID was 2 in this case).

    Then, I just went to the question’s logic and used the “only show this question based on answers to previous questions or other logic conditions” option to say “[Hidden variable] < 100” (100 being the response count I wanted to end it at).

    The custom script is the following:
    %%output .= sgapiGetQuestionResponseCount(2);
    sgapiSetValue(5, %%output);

    How to read it:
    %%[user-defined variable] = sgapiGetQuestionResponseCount([ID of question you want to count]);
    sgapiSetValue([ID of hidden variable], %%[user-defined variable];

    Hope that helps everyone!

    Nick Wicks answered


      Question stats

      • Active
      • Views4072 times
      • Answers1 answer
      • Followers1 follower