Preventing users to Answer more then once


Hello, recently I noticed our code for preventing users to answer more once in our survey stopped working.

 I tested following code which should prevent users who provided their ID number in question 2 to take part in survey another time. Please could you be so kind to check the code and let me know whether there is some error? We place this code to 2nd page of our survey.

Thank you

%%qid = 2;
%%IBC = sgapiGetValue(%%qid);
%%sid = 3099836;
%%message = “<style type=’text/css’>.sg-footer{display:none;}</style> Je nám líto, ale z tohoto poradenského čísla se již hlasovalo. V případě nesrovnalostí se neváhejte obrátit na oddělení podpory prodeje Mary Kay. Pro návrat na anketu klikněte <a href=’’>zde</a>.”;

%%filter = “&filter[field][0]=[question(“.%%qid.”)]&filter[operator][0]==&filter[value][0]=”.%%IBC.”&filter[field][1]=status&filter[operator][1]==&filter[value][1]=Complete”;
%%api = sgapiList(%%sid,1,1,%%filter);

if(%%api[’total_count’] > 0){

IS answered
    IS 2.19K Rep.

    I could have missed something, but I don’t see anything wrong in the code. If it worked before, it should work now.

    The only thing I can think of is that I am wondering how long it is between the submission of the first survey for the ID Number and the second try. A submitted survey takes up to 5 minutes to be available for retrieval via the api. In my experience it is usually more like 30 to 40 seconds. If the first survey is submitted and then you immediately try the ID number again, it will not be found via the api call.


    IS answered


      Question stats

      • Active
      • Views240 times
      • Answers1 answer
      • Followers1 follower