[Solved] Filtering sgapiList calls


Whenever I try to use a filter on an sgapiList call I get an empty ‘data’ array in the response object. I have tried using exactly the same filter query string via the REST API and it works fine. I have also tried making an sgapiList call without a filter query string and it works ok.


%%id = <my survey id>;

%%query = ‘&filter[field][0]=status&filter[operator][0]==&filter[value][0]=Complete’;

%%response = sgapiList(%%id, 1, 1, %%query);


Can anyone shed some light on what might be the problem? Thanks. 

richardharrison asked

    Best answer


    Hi Richard! I copied and pasted your example in to a test survey (inserting an SID and replacing the silly curved quotes our Community software inserts with normal quotes), and it worked just fine. Are you certain the survey you were pulling from had any Complete responses?

    Nathan - Survey Astronaut answered


      Question stats

      • Active
      • Views3266 times
      • Answers1 answer
      • Followers0 followers