I have been looking extensively for solutions but can't find any, so I will try to explain my issue here and hope someone can figure out what is wrong. In advance thanks!
What is the problem? Please be detailed.
So. I am building a XLS form for fisheries catch monitoring. Several catch types are selected (i.e. tuna, mackerel, etc), then there is a set of repeated questions for each catch type selected (let's call it "catch_repeat"). Within this repeat group (catch_repeat), I have a nested repeat for individual lengths of each fish (length_repeat). Now this length_repeat question is repeated based on the number of fish per catch type, max. 5.
Now my issue is that the form works fine as such, expect that when publishing to GoogleSheets, the parentID for the length_repeat does not link to anything - I would assume it would link to a catch_repeat specific ID (for each catch type).
So, as I tried to fix that, I created a unique ID for each catch type in the catch_repeat (based on fisher name, time fishing etc).
Then I am using indexed-repeat in the length_repeat so that it returns that catch_repeat_ID, and I can then link the length_repeat data with the catch_repeat data on GoogleSheets.
Now after submitting data, and published on GoogleSheets, the length_repeat_ID that is returned for each length does not correspond to the catch type. Screenshot below (highlighted are what should be the different lengths of 3 catch types, however we can see the repeat_ID is not the same per catch type). It seems it is looping through the different catch_repeat_ID available, and I don't understand the error - is that due to the jr count setting for length_repeat? That it is a nested repeat?
I downloaded and tested your form. Are you sure it's a form you tried?
I'm asking because:
You have a group with a field-list appearance which contains a repeat group what is not allowed and I needed to remove the field-list appearance.
As I said above you use a repeat group inside a regular group what caused problems on v1.19.0 and older versions, which we have fixed recently and it will be available in v1.20.0 https://github.com/opendatakit/collect/issues/2896
so to test your form I did have to use a beta version which includes the fix.
The third issue was too long sheet title - we create another sheet title for repeat groups. The name is based on the form name + group name and it can't be longer than 100 chars. Your form name is long so it caused problems and I had to change it as well.
I might have sent you an earlier version of the form... Though I made sure to test it before sending out, but sorry if I've sent the wrong version. Indeed I had the error of the group with field-list appearance containing a repeat group - so I had removed the field-list appearance as well.
I'll make sure to download the latest version. It seems the different variable names are created differently - before the group names did not appear.
Taking advantage of the opportunity, I was wondering if the groups we are using are relevant/necessary? Eg the "fisher agree" group. I feel like this does not bring anything to the database/form, considering how data is laid out on google sheets and that we use one question per screen on ODK (questions not grouped on one screen).
@Grzesiek2010... I still encounter the same error (parent uid not linked to previous repeat id) even with the v1.20 ?! Attached the modified form I have used (I removed the groups). Com_Boatcatch_2019.xml (62.4 KB)
The spreadsheet you shared also looks different (key/parentkey) and not uuid.
Am sorry if being a bother, but I don't understand where the issue might come from. Thanks in advance!
It is as if I still have the older ODK version? Although I downloaded the v1.20 and it looks different on the Android (than the previous version). Can that be an issue with the publishing to Google Sheets from the appspot?
They just don't appear... That's the Google sheets that is published from the appspot server. Is that due to the fact that server is on Aggregate? So forms are uploaded there and then published to Google sheets?
I see that there's been some discussion as to the form's structure at this point. Before starting to study this, could you link to the right form we can consider is OK and helps to reproduce the issue you've described?
Here is a working XLS version below. The only issue is that the uuid from the nested repeat does not link to a parent ID in the "higher" repeat (as illustrated in the first screenshot I sent). Com_Boatcatch_2019.xlsx (99.7 KB)
Sorry for taking so long! Could you send me some submissions that reproduce the issue you're describing, please? You could use Briefcase to push the form to the sandbox and then I can pull it to my computer if you want.
I am not using Briefcase actually. We use Aggregate to upload forms and then download in ODK on tablets. With the link below you can find an example of the database with 2 test forms that have been sent (I am publishing to GoogleSheets from Aggregate server).
It illustrates the issue: the parent uid created for the "length repeat" entries does not link to the "catch repeat" entries. (however the catch repeat is linked to the main form instance (com boat catch). It should however as "length repeat" is nested inside "catch repeat"?
Hope this is clear enough, let me know if you need more details,