Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How to check if a survey's has new or modified responses - programmatically?

  • ngwulee
  • ngwulee's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #205947 by ngwulee
So we use the remote control API to download survey responses and transform them into a map (amongst other things).

The problem we have is that this process can't tell when it needs to run. We have to poll the survey server, and even then can't tell if the server has response data which need processing. So we process the whole lot every time.

This is not ideal. I've been looking for something in the API, or even the web UI, which can short-cut this process, and give us a list of response IDs which should be re-processed because they are either new, or modified. So far without success.

Can anyone suggest a way to do this?

Thanks!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #205966 by DenisChenu
In api.limesurvey.org/classes/remotecontrol...hod_export_responses

you have a variable : $iFromResponseID ,

Then if you already get until 1000 for id, you can set this var to 1000 the next time.
Need to keep current value in your tool.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #205983 by tpartner

Need to keep current value in your tool.

Or, use the API to record that in another "control" survey.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • ngwulee
  • ngwulee's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #205985 by ngwulee
Thanks for the suggestion.

However, the responses sometimes get modified after their initial creation by an administrator or (possibly) the original user. I don't think this method would spot those changes would it?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206002 by DenisChenu
Use afterSurveyComplete event : manual.limesurvey.org/AfterSurveyComplete

to send the id to your tool.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • ngwulee
  • ngwulee's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206006 by ngwulee
Can the `afterSurveyComplete` event fire many times, once after each modification?

I would also guess this would need us to write a plug-in, is that correct?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206019 by DenisChenu
afterSurveyComplete : see the manual : when surey is submitted. Not when updated

An alterantive solution can be create you own API function.

See gitlab.com/SondagesPro/RemoteControl/ext...xportReponseFiltered for a sample.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • ngwulee
  • ngwulee's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #206046 by ngwulee
Thank you very much for your help.

We're not self-hosting our LimeSurvey instance (we're on limequery.com), so we don't have access to the source code, and nor can we install 3rd party plug-ins:

manual.limesurvey.org/Plugin_manager#How...ird-party_plugins.3F

Sadly none of the suggestions so far seem to be both possible (for us) and cover the cases we need, i.e. to indicate when responses are modified.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206048 by DenisChenu
Maybe you can contact limequery : account.limesurvey.org/customer-support

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206110 by holch
Why not use the end url to trigger your software to know that there have been changes?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206112 by tpartner
Interesting idea but I don't think it covers the scenario where an admin updates the response in the back end.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #206113 by holch

Interesting idea but I don't think it covers the scenario where an admin updates the response in the back end.

Agreed, one would definitely need to reach the end of the survey to use this feature.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose