Repeat problem


(Mukti Chhetri) #1

What is the problem? Please be detailed.
I have a short form with repeat (more then 500 to sometimes 2000 times). after around 450 repeats the form hangs up and cannot proceed ahead,

What ODK tool and version are you using? And on what device and operating system version?
Odk Collect V1.10.2
OS version 5/6 (tried in multiple os level)

What steps can we take to reproduce the problem?
Is this the normal behavior with such a long repeat?

What you have you tried to fix the problem?
Freed memory to 2GB , which I think is OK.

Anything else we should know or have? If you have a test form or screenshots or logs, attach here.

(danbjoseph) #2

Hi @Mukti_Chhetri! I've never considered having a repeat occur that many times inside of a single form submission. I'm curious. Are you able to provide any more details about the use case? I would think it might better to break up the data collection so that you complete a form more frequently. This would protect you against losing too much data if Collect crashes or what not. Also, repeat groups can sometimes create difficulties when analyzing data. I'd be curious also about the analysis part of your data workflow (if you're able to share).

(Mukti Chhetri) #3

Hi @danbjoseph, Thank you for the concern. My form is about collecting data of plants in orchard. Monitors visit each hole (holes are supposed to be for plants) and record hole contents like empty,plant variety,health condition etc.

I would be happy if there are other way round to do this plant tally in orchard.

I am afraid, if i explained you well!

tblfieldqctally.xls (51.5 KB)
itemsets.csv (1.8 KB)

(danbjoseph) #4

Your data collection flow seems like you should consider using a relational database. In this case, just two spreadsheet tables. One for the field details and one for the trees. You'll need one column that appears in both tables that has a value that can link the two tables (e.g. field ID). The field ID would only show up in one row in your field table but multiple rows in your tree table would have the same field ID value.

Have you used pivot tables before to analyze data? It will be much easier to tally and analyze your data if the trees are one per row.

| growthphase | mainoption | productiontree | pollinizertree | planthealth |
| tree1       | tree1      | tree1          | tree1          | tree1       |
| tree2       | tree2      | tree2          | tree2          | tree2       |
| tree3       | tree3      | tree3          | tree3          | tree3       |
| …           | …          | …              | …              | …           |

And not in an ever-expanding series of columns (which is what your repeat group with produce).

| growthphase_1 | mainoption_1 | productiontree_1 | pollinizertree_1 | planthealth_1 | growthphase_2 | mainoption_2 | productiontree_2 | pollinizertree_2 | planthealth_2 | … |
| tree1         | tree1        | tree1            | tree1            | tree1         | tree2         | tree2        | tree2            | tree2            | tree2         | … |

The simplest way to do this would to be split your current survey into two: one for the details on the field, and one for the tree/plant check. Unfortunately, this creates two problems:

  1. Instead of one click (to add another repeat group) the user would have to finalize the submission and open the form again. This adds a click.
  2. You'll need someway to link tree submissions to a field submission. If only one field is being surveyed at a time, you could do this by submission time and manually add the correct value after exporting the data. If you might have people in two different fields at the same time, then you'll need to add an additional question, some sort of pre-generated unique barcode you can scan maybe. This adds at least one more interaction with the survey for each tree. Which, for an orchard full of trees, each additional user interaction to collect data on a tree matters. It will add up and can make a big difference in total time spent.

Side note: Your external itemsets is small. I think you could just include them on the choices tab of you main survey file. Is there a reason you choose to use an external file for them?

(Mukti Chhetri) #5

Thank you, @danbjoseph, your suggestion is very helpful.

Would appreciate, if you could share some example, i guess, there might be others with similar situation.

I see bit of a problem using multiple forms considering frequency of submits/person and the time taken to survey the orchard.

The external itemset list is big actually(around 400+ admin locations,150+ field monitors etc), I attached only for sample so that the form runs.