We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

tnguyen • 6 years ago

Hello,

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!

Thank you,

Thong

martijnr • 6 years ago

Hi Thong,
Calculations can always re-run, and therefore only make sense on hidden or readonly fields. There is a limited workaround by using the once() function. Have a look at the documentation for its limitations: https://opendatakit.github..... In the future we'll have dynamic defaults that will do exactly what you want without limitations.

tnguyen • 6 years ago

https://uploads.disquscdn.c...

Thank you for your quick response, martijnr. I tried nesting the pulldata() function in the once() function but it did not work. I have attached the screenshot for your reference. Without once() outside of pulldata(), it works. Is there mistake in the "calculation" that you can tell? I look forward to hearing from you. I really appreciate your help!

martijnr • 6 years ago

That looks good.

tnguyen • 6 years ago

Unfortunately, it does not work. Below is the error. "prepop3" is the name of the CSV file with two columns named "field" and "value". The pulldata() function works without once() wrapping around it. Do you have any idea on the error?

FormLogicError: instance "prepop3" does not exist in model

https://uploads.disquscdn.c...

martijnr • 6 years ago

Are you sure you've uploaded the CSV file?

Balaji P • 6 years ago

hi martijnr i have upload media file form in csv file. error failure monthly submiision limit 500 exceeded.
what problem please quick reply.

martijnr • 6 years ago

Enketo has no limit. This message is not coming from Enketo.