I’ve a survey including a repeat function. Within this repeat function, pulldata is being used to automatically fill a field (field = categorie in attached documents) based on the repeat generated with count(). This works except from the case when I want to go back to a previous item in my repeat. In that case it overwrites the previous item based on the new count. Therefore, I added the once() function to my pulldata calculations to enable going back to previous repeat items, but then it somehow shows my first entry twice. I cannot figure out why this behavior happens. Do you maybe have any idea or any suggestion about this? See attachment for both survey folders (including xls and pulldata csv files).
Hi Iris,
I can see the issues you are having - it appears that the once() is not working properly for the first repeat, leading to a trailing numbering sequence. I've filed an issue to address this.
Hi James,
Thanks! Do you have any idea when this will be solved? Do you know if there is a workaround for this issue? A workaround with which items in a repeat can be automatically filled by using pulldata. Is there maybe a function that can replace the count() function?
In my testing, I was receiving the sequence 0,1,2,3 , so adding 1 to the count should work around the issue. I don't have a specific timeline for resolution.
This issue will be resolved for 3.1.
Don't know if this still an issue and if it applies to my issue. Basically I'm using once() to only collect the username of a user via the webform only once and not replace it if a different user logs in. Would this be an issue with once()?
Hi Joe,
Typically, once() is used only in the context of a form session (as opposed to editing forms); that being said, it should work in the context you describe.
I’ve tried numerous times using once() in calculation field and the expected behavior doesn't occur. My code is:
once(if(${Request_Status}='In_Progress',once(${user_status}),"))
Thanks
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.