Problem using pull data with ODK Collect app

Hi everyone,

I have a little issue and I don’t know how to solve it.

I have a form using pulldata function. It used to work perfectly but since I have updated the csv file it doesn’t work anymore on the mobile app. It only works with Enketo.

Do you have any suggestion?

Thank you

Fabien

@fpageot, you will need to redeploy your project (upon making changes to the CSV file). This should solve your issue.

Thank you for your answer, I’ve already redeploy it multiple times and it’s still not working.

Have you checked your CSV’s structure? Sometimes the structure could affect the loading of your data from CSV to the form.

I don’t see anything wrong with the structure.
Do you have any suggestion of what I should check about the structure?
Thank you

Feel free to share them here.

Having looked at your CSV I noticed that your CSV file is structured differently:

You will need to structure it as shown in the image below:

Fixing this structure should solve your issue.

I am not sure to understand what you mean.
Do you mean that it should appear as a table or that I should put the key on the first column?

If you compare the CSV files you should be able to see all your information under column A, but as for mine each variable holds one column. So restructure your CSV file and that should work.

But that’s only because the delimiter is “;” instead of “,”.
In all the previous form that I’ve used with pull data function it was the same and it works perfectly.

Yes, try fixing this and it should solve your issue.

I don’t know why but it’s not working

All you have to do is transform your data by going to DATA>Select the first column that has the data>Text to Columns.

I have managed to make it work but the problem was not about the structure.
The real problem to me was :

  • The problem what that excel recognize the key column of my .csv file as a long number and therefore displayed it in a scientific format.
    → If you save the file at this point, you’ll end up with a .csv not containing a number but a text that looks like a number in a scientific format.
    → If you don’t save it. Enketo will manage to recognize it a plain number or plain text and make it work a your key column. But ODK collect will not so you won’t be able to pull data from the csv file.

Solution that has worked for me :

  • I open the csv file on excel
  • I ask excel to display the key column in a number format without any decimal
  • I copy past all the data is google sheet
  • I change the format of all the data to “plain text”
  • I save it as a csv.
  • I load this csv to kobo

I am not sure if this is what solve this issue but now it works.
Thank you @Kal_Lam again for your help and I hope this will help other

1 Like

Thank you @fpageot! This should definitely help our community having similar issue. Expecting similar help in the upcoming days too. This should make the community a learning and sharing platform.

1 Like