Hi,
In our survey we have the problem for our fieldworkers that values entered in one repeat can jump and insert themself in an other repeat in the same question.When that happens a required field alert for a field in the repeat, that is already answered will say that it needs an answer and you can't change the alert even if you answer a new value, thus making the survey not possible to send in.The survey is quite complex, but I send a very simple survey how the basic structure of the survey is built. The problem does not happen every time and is hard to systematically isolate.Sincere regards,Marcus
Not sure why you are using position(..) and counting numbers. Counting is the "old" way and I would use position. I would not name the field position though.
If you do you count you usually need to but a once() around it or it will be recalcing on you all the time. Like when a user scrolls back in a repeat it will fall apart. Also not sure why there is a required on the counter.
Hope that helps
Thank you very much Doug! It makes it more clear on what could be the problem.It's primarily only the count method that is used currently while we are also testing the position method if that makes any change for the better. However this is just a small demo for the survey we use, we are a governmental branch and the survey have maybe 200-300 fields.The once suggestion was useful, we have many calculate fields in the repeat and our surveyors regularly goes backs and edits data. Should you change all calculation fields in repeats to include also once() ?
That tonally depends on what the calc is. If they change a value then you may want a recal. Counting you would not.
I have been using position in forms that big without issue. (I am also a govt agency so feel free to write me.) One trick is in nest repeats you cannot use .. you have to give it the repeat name you want. position(${repeatname}).
If you just want a unique key uuid() works great. I personally always use meaningful ids so I can recreate them if they get messed up (like if you delete a parent the child goes null).
Thank you, that is very generous of you!Yes hmm, do not still really know what is causing the jumping repeats . I think we have to use relevant and not once() in repeats due to that we have a question outside the repeat that dynamically set the repeat_count, and this repeat_count can change during the survey.So is it that if you have a nested repeat you have to give the name of inside repeat as an argument to position for it to work?Would you by perhaps have the possibility to look if you find something with a quick eye, by sending it over email perhaps?Thank you,Marcus
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.