The info inside a repeat is deleted if the question used as a variable for the repeat count has changed

1014
3
Jump to solution
08-06-2021 04:02 AM
newwollyka
New Contributor III

I have a form that start with a question regarding the number of dwellings

I am using the number as a repeat_count for a set of questions inside a repeat group (number of households inside the dwellings, name of the HoH, etc.)

However, I am facing a little problem. If I enter say 4 dwellings and fill in the info for these dwellings and then I change the number (say I discover there are 5 dwellings instead of 4), all the previously entered information is deleted.

I am using survey123 field app

 

Thanks

 

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi @newwollyka,

Sorry for the delay in replying. I had a look at your XLSForm, and the issue is related to the numbers appearance you are using for repeat_count.

When a repeat_count value is changed, if the value is deleted, and a new number entered, the repeat will go through a null (zero) phase, where there will be no repeats set. This has the impact of deleting all the repeats and their values and creating them again.

Using the numbers appearance does this when you try to update the number, as it deletes the old number and replaces it with a new number. During that transition repeat_count to zero, which wipes out all the existing repeats.

If you use the normal keyboard for number entry (not numbers appearance), the user can add the new number, without removing the old number, for instance to change from 4 repeats to 5 repeats, you enter the 5 next to the 4 in the input box, so 45, and then delete the 4. This is the only current workaround to this issue.

Regards,

Phil.

View solution in original post

0 Kudos
3 Replies
by Anonymous User
Not applicable

Hi @newwollyka,

Can you confirm what version of Survey123 Connect and field app you are using? Is it the latest?

Also, do you have relevance on the form, more specifcally the repeat or repeat count questions. If the repeat or questions in the reepat are becoming not relevant when you change the value, ie make it 0 and then another number, the values and repeats will be cleared when it is in the not relevant state.

Can you share the XLSForm (xlsx file and media files) so we can take a closer look, and also provide any further steps and values to reproduce the issue.

Regards,

Phil.

newwollyka
New Contributor III

Yes, I am using the latest Survey123 Connect and even tried the Beta. Same for the field app.

The form has relevance. I attached it.

Thanks

 

 

0 Kudos
by Anonymous User
Not applicable

Hi @newwollyka,

Sorry for the delay in replying. I had a look at your XLSForm, and the issue is related to the numbers appearance you are using for repeat_count.

When a repeat_count value is changed, if the value is deleted, and a new number entered, the repeat will go through a null (zero) phase, where there will be no repeats set. This has the impact of deleting all the repeats and their values and creating them again.

Using the numbers appearance does this when you try to update the number, as it deletes the old number and replaces it with a new number. During that transition repeat_count to zero, which wipes out all the existing repeats.

If you use the normal keyboard for number entry (not numbers appearance), the user can add the new number, without removing the old number, for instance to change from 4 repeats to 5 repeats, you enter the 5 next to the 4 in the input box, so 45, and then delete the 4. This is the only current workaround to this issue.

Regards,

Phil.

0 Kudos