Hello everyone,
I am exploring ways to clean up the data payload sent to the Survey123 website, as we capture it using a webhook and do our own processing of it into our database. We have discovered that when form questions are not initially displayed (using the relevant) column, that field is not included in the payload. I would very much like to extend this behavior to entire sets of data (generally in one or more repeating groups) so that if a particular set of data wasn't relevant during a site visit, it isn't included in the payload at all. When repeating groups are initialized along with the form itself, if the inputs therein aren't actually used, a "data shell" is still inserted into the data payload and we would like to see if we can clean that up on the front-end.
I have previously made use of yes/no questions to control certain groups displaying or not; however, if a group is displayed and data is input into it, and then for some reason the yes/no question is set back to the state that hides the group....well obviously the group becomes hidden again and all of it's inputs are wiped. This can be disastrous for a repeat with even a small number of records!
I have been seeking a way to effectively block a user from accidentally switching the input to such display-controlling questions off of the answer state that makes subsequent groups appear. I thought this might be possible using some logic in the readonly column, but alas Survey123 cannot handle self-referencing conditionals (as far as I know).
The only approach I have thought of so far is to put the display-control question on a different page from the group it controls, but that isn't really a solution in this case.
If anyone has tried something like this before or has any thoughts on the matter, I would love to hear from you!
We had this happen a lot and changed it to using the body::esri:visible instead. Works the same to user but does not wipe the data. That can also be bad though if you want it to wipe. Not sure it helps your URL issue.