Hi!
When I edit a survey from the Outbox or from the Sent folder, an answer which is in nestead repeats stays empty.
There is a criteria in the relevant column of the second repeat that checks the value of a question which is outside the repeat.
There is also a criteria in the choice_filter column that uses a question which is outside of the repeat.
My survey tab
type | name | relevant | choice_filter |
begin repeat | inspected_element | ||
select_one location | location | ||
select_one yes_no | issue_exists | ||
begin repeat | issue | ${issue_exists} = "yes" | |
select_one issue | issue_name | filter_1=${location} | |
end repeat | |||
end repeat |
My choices tab
list_name | name | label | filter_1 |
yes_no | yes | Yes | |
yes_no | no | No | |
location | Indoor | Indoor | |
location | Outdoor | Outdoor | |
issue | Paint | Paint | Indoor |
issue | Paint | Paint | Outdoor |
issue | Water | Water | Indoor |
issue | Water | Water | Outdoor |
issue | Garden | Garden | Outdoor |
issue | Floor | Floor | Indoor |
My software versions
Software | Version | OS |
Survey123 Connect | 3.19.116 | Windows |
Survey123 | 3.19.121 | Windows |
Survey123 | 3.19.121 | Android |
Solved! Go to Solution.
I just tried it. I was able to get all the values to populate with a little change: I swapped "Relevant" for "body::esri:visible".
Just be aware that if you go this route, all required questions still apply even if something isn't visible. This can be easily solved with a dynamic "required" field (i.e., use an IF() statement to calculate required=yes)
You need to add query allowUpdates=true to bind::esri:parameters
This is very important for Repeats being edited.
Thanks for your help @abureaux . I forgot to put this parameter in the first repeat.
I added it without luck. That doesn't resolve the issue.
Have you tried my Excel file?
I just tried it. I was able to get all the values to populate with a little change: I swapped "Relevant" for "body::esri:visible".
Just be aware that if you go this route, all required questions still apply even if something isn't visible. This can be easily solved with a dynamic "required" field (i.e., use an IF() statement to calculate required=yes)
It's not the way I was expected, body::esri:visible is not something that I uselly use, but it works!
I realy think that this is a bug that ESRI should fix because it could happens to anyone.
My real survey is much complex that the sample I put in this post, but I will adjust the required criterias as you told.
Thanks you so much @abureaux
body::esri:visible has some excellent uses!
I agree that this does seem like a bug. I would suggest you bring this up with Esri Support in the hopes of it getting logged as such and eventually fixed. At least there is a relatively easy workaround for now.
For those that find this thread in the future and are curious about body::esri:visible vs. relevant:
Field | Same | Different |
body::esri:visible | Uses logic statements to dynamically show/hide a question, group, or repeat. | Hidden items are just "invisible". Data entered into fields still exists and is not lost. Required fields are still required, meaning they need valid data entered prior to sending (you can bypass this with dynamic required fields) |
relevant | Uses logic statements to dynamically show/hide a question, group, or repeat. | Hidden items no longer exist. All data is lost when the field is hidden. Required fields no longer exist, meaning a hidden field that's required will not cause any issues. |