Problems with pulldata() in Enketo while data cleaning

Dear all,

We are running a series of phone surveys, where the interviewer selectes the respondent a list, in order to subsequently pull in some information from previous survey rounds conducted with the same respondent. This information is stored in two separated .csv files that are both pulled into the form using pulldata().

All this works fine in the app. However, when using Enketo, we receive the following error message:

FormLogicError: Could not evaluate: instance(‘numbers - R6’)/root/item[name_ID = ‘’]/number1, message: Function “{}instance” does not exist.

Even though data collection itself happens in the app, the above creates a massive problem for us, as we are constantly doing datacleaning/editing in Kobo (and thus require forms to open in Enketo).

Any pointers very much appreciated.
Johannes

Thanks wroos. But I am pretty certain that this is a pulldata() issue, as it only began appearing in deployments where we started importing (the second) csv file. Also, the error message references fields in the csv.

Cheers,
Johannes

Hi @vonengelhardt
Could you kindly check if this happens on all browser types?

Stephane

1 Like

Hi Stephane,

I tested this on Chrome and Microsoft Egde, with identical results.

But I finally figured out what the problem was: one of our csv files had a whitespace in its file name (“numbers round6.csv”). This does not appear to pose any problems for the app, and also Enketo seems to be able to open the csv just fine (otherwise, another error would appear). However, when it comes to pulling in data from the csv, the whitespace in the file name seems to create this issue.

Cheers,
Johannes

3 Likes

@vonengelhardt, thank you for sharing the solution with the entire community.

Hi @vonengelhardt
Thank you for the good catch on the whitespace. As a rule of thumb, the naming of the columns should conform to the naming of the questions within the form. We can see if we need to emphasize this in the article for pull data.

Stephane

1 Like

Thanks Stephane. But note that the whitespace issue was not about the column names, but about the file name of the csv. A warning that the file name should not include any whitespaces might indeed be useful in the pulldata() article.
Cheers.

1 Like

Hi @vonengelhardt
Thanks for that clarification.

Regards,
Stephane

1 Like