Currently I’m working on a project where I need to capture survey responses for multiple survey in a single task. Each survey have multiple attachment type questions. During my testing I found that when I’m taking the first survey (with attachment type questions) there is no issue, but in the subsequent surveys when they’re reached at the end and I’m saving the surveys. It is syncing the responses of the previous surveys as well, and it is happening for rest of the survey. For example, if there are 25 surveys and the first survey is synced to the survey 25 time the 2nd survey 24 time and so on.
Here in this example: I’ve queried all responses for first survey (survey_id: 261), first question (question_id: 3295) and task id (61232), which should’ve only one response but in reality, there are 38 responses registered by server. If noticed properly the answers are exactly the same but creation time is different (i.e. at the end of each survey).
and if we look into the mobile sync, I can show you there is a lot of survey responses are synced at the same time. This screenshot is taken during the survey, and I can assure we don’t have any survey that exceed no. of question more than 15.
This thing is really causing a huge problem as we are proceeding with survey it keeps accumulating the responses so in our case we have 38 surveys and each have on average 15 questions so at the very end of the survey the device is trying to sync nearly 570 responses at a time and eventually causing the app to crash. And the same task mentioned earlier (task_id: 61232) with at most 570 questions registering more than 6000 responses in the survey result table.
This issue is only with attachment type survey if the type of question in a survey is other than attachment type this problem is not there.
Does anyone know what is causing the problem and what could be the fix?