I am Charles Mouté, data manager in an NGO in Cameroon.
As part of our activities, we wish to simultaneously update data collected last year and collect new data. The attached form has been designed for this purpose. It is an extract that is shared with you.
The pulldata function is used to pre-load the information to be modified. The changes seem to be saved on the web version, but not on the mobile version of KoboCollect. I use KoboCollect v2022.4.4.
As you will see in the xlsform, I have tested different calls to the pulldata function. At the time of the data transfer, it is the preloaded data that is recorded. It is also impossible to add new information.
Welcome to the community, @charlesmoute! Maybe you will need to use the single inverted comma ' instead of using the " as outlined in the support article Pull Data Functionality in KoboToolbox. Here is a sample of what you have used in your XLSForm:
@Kal_Lam, thank you for your comments. I changed the inverted comma ’ instead of using the ". However, this did not solve my problem.
It should be noted that even with ", the pulldata function works fine. My concern is that when finalizing a record on kobocollect before transferring it, it seems that the puldata function, which is in a calculation field, is recalled and therefore resets all the fields, cancelling de facto the changes made.
Unfortunately being a new user, I cannot share the xlsform & csv files directly on the forum. However, if you can, you can download the files at the google drive link and test to better appreciate the issue.
PS : Under Enketo, the modifications of the preloaded data work very well but not on kobocollect.
The xlsform and csv file can be accessed at the following link :
@charlesmoute, did you mean you wanted to edit the information that is present in the form pulled by the pulldata function from the CSV file? Did I get you correctly?
Yes, that’s right @Kal_Lam . The modification works on Enketo but not on KoboCollect. I also tested the xlsform on ODK Collect, it doesn’t work, but on SurveyCTO Collect. My question, is it possible that this is a bug in KoboCollect?
@charlesmoute, I tested your sample XLSForm and the CSV file and it worked perfectly for me. However, if you talk about editing a value that is pulled through the pull-data function, please be informed that it’s not possible.
We already have a discussion here that explains more on this:
Thank you @Kal_Lam . It is indeed this behavour of the pulldata function that I found inconsistent.
This is all the more so as on Enketo (web version of the questionnaire) & Survey CTO Collect it works very well. Indeed, contrary to KoboCollect which seems to re-execute the calculation fields when finalizing a questionnaire and thus to erase all the modifications made on fields with pulldata in the calculation column. The other Enketo & SurveyCTO, seem to call the pulldata function once and only to initialise the fields, a bit like with the default column.