[Solved] sgapiGetQuestionResponseCount


Hello, my question is related to sgapiGetQuestionResponseCount command.

Could you clarify, if this command counts completes only or all responses, incl. disqualified?

Currently I see that this is not actually real time function (as described), I get results with some delay (~30 sec). It means that this function does not count responses from current session because obviously these responses cannot be counted as completed yet (at the moment when script runs). Is this expected behavior?

I want to make sure that I count responses absolutely correctly.

If I understand correctly, could you advice another function to count responses from current session (for questions located above the script)?

Nikolay Ryazantsev asked

    Best answer


    Hi, Noel, thank you for response. Yes, I have built own quota system for quoting over multiple choice (in percents). Just completed first survey, it works just fine. I will post code here.

    Answering my own question, sgapiGetQuestionResponseCount counts completes and we can count multiple choice session responses with sgapiCount but I used more brutal approach with foreach to achieve more flexibility.

    Nikolay Ryazantsev answered

      Since response processing takes a little extra time I can completely see how it wouldn’t be absolute real time but it should be close. Also, from my understanding, the command counts only completes. Are you using it to build your own quota system? if so, behind real time should work okay…

      Noel Black answered


        Question stats

        • Active
        • Views2510 times
        • Answers2 answers
        • Followers0 followers