I have a survey with a repeat in it that I've published from Connect but is being used as a web form. The repeat is optional and is triggered by people selecting a particular value on the main record. It is entirely hidden until that value is selected and this is done using a relevant statement in the 'begin repeat'.
This all looks great and works well in the web form, except for one thing. For records where the required value to unhide the repeat isn't entered a blank record in the repeat is still created.
I've seen some posts suggesting this is expected behaviour in slightly similar circumstances but I wondered if it was also the case here - or whether there was a way to stop the blank records from being created?
Holy moley it's be six years and this still isn't resolved:
https://support.esri.com/en-us/bug/if-a-relevant-field-is-configured-on-a-repeat-to-only-s-bug-00012...
I sure hope somebody can suggest a workaround.
I'll reply to my own post here in case anyone comes looking since I found a workaround that seems to function in 3.20.63.
In my case I have nested photopoint repeat. There's a geopoint question, an image question, and a few others. The repeat has a relevant condition on a proceeding question, 'NeedPhotos' (${NeedPhotos} = 'Yes'). The NeedPhotos question is itself subject to a calculation...if a previous question (PositiveImpact_YN) is set to 'Yes' then the NeedPhotos question is automatically set to 'Yes' and photos are enforced.
I noticed this behavior: If in the course of the survey PositiveImpact_YN is set to 'No', the photo repeat does not appear (desired behavior) but it sends a ghost record (undesirable behavior). However, if I set PostiveImpact_YN to 'Yes' (photo repeat appear), then back to 'No' (photo repeat disappears), then it doesn't submit a ghost record. It's like the survey needed some positive affirmation do the right thing, and it fires appropriately and strips out the photo.
For my case I changed the NeedPhotos calculation and added a calculation in the 'Visible' column...so the user can't see it but behind the scene the 'NeedPhotos' gets defaulted to yes, but is invisible, and then the above chains of calculations from PositieImpact_YN will push it back to 'No', and the ghost record gets killed.