I have encountered a problem with preloaded data overwriting what a user had in a draft. Basically in the pulldata() function, the user_id is used to automatically preload data into a field. When the user first opens the form to fill out, preloaded data is there, prefilling some of the fields. Then s/he makes changes to some entries in the form and saves it as a draft. Some time later, s/he loads the draft back up to continue filling out. All changes in data-preloaded fields are reset back to the preloaded data. This is a major hiccup because the purpose of a draft is to temporarily store partially filled-out survey data for later revisit(s) until submission. Is there any option to retain the changes to the data-preloaded fields s/he has made and saved into the draft so that the form is opened with the latest changes the next time?
I much appreciate your advice!
Would you mind looking at some of the discussions (from the community forum) on pull data:
Also advise you to have a look at the support article on Pull Data () functionality in KoboToolBox if you have not gone through it.
Hope these reference materials should solve your issue.
Thanks for your response. I’ve gone through all discussions on pull data as well as the support article but none of these discuss the issue I’m running into. In fact, since I had not found a solution out of these discussions, I decided to post my question here.
I would a appreciate an idea to resolve this issue.
Would you mind sharing your xlsform as well as the csv file (with the pull data function). We would like to test it for you and see if the problem exists in out side as well.
I have contacted Enketo Support and they confirmed this is an issue with pulldata() function. They recommended a workaround by using once(pulldata()). Basically the once() functions only triggers the nested function once the field is empty. If the field is not empty, it just leaves it as is and as a result, preloaded data will not be pulled into the field. Something that looks like in the attached screenshot.