Preloading Data from CSV File


#1

Hello Everyone,

I’m only learning how to develop questionnaires on CommCare and coming from the ODK platform which I’m more familiar with, I need to adopt an already functioning ODK Collect form to a CommCare survey.
You see, my existing ODK questionnaire neatly integrated data filtering from an existing CSV data file achieved through ODK’s pulldata() function to filter through the thousands of rows of data and present available matches as radio button options for the user to choose.
So my questions put very simply are:

  1. Does CommCare accommodate integrating separate data files (like ODK’s CSV files) to its Followup forms? (I know it does accept media files: audio, video, e.t.c). As mentioned, my data file contains tens of thousands of rows of data that the user should have access to during the Followup survey. Technically, this data should’ve been collected in the Registration Form.
  2. Does CommCare accommodate some form of filtering applied on said data files? Since the end user is dealing with so many records, I wouldn’t want them to have to manually scroll through such a long list looking for their records.
    I know cases can be used to pull existing data - and I thought about a case list to substitute the CSV file, but I’m stumped on how exactly I should pull this off for thousands of records and also how to make it convenient for the user to quickly find the case they’re looking for.

Please let me know.

Thanks


(Ethan Soergel) #2

CommCare has a feature called “Lookup Tables” that’s useful for storing arbitrary data to be used in your application. You can read more about it on the help site here:

https://confluence.dimagi.com/display/commcarepublic/Lookup+Tables


(Mazen AlAli) #3

short answer is Yes! you can use what commcare calls “Lookup tables” to upload bulks of data with headers of course, then you can reference this data in your forms. i would advise towards having filters loaded before you query the table as i’m sure you’re aware to avoid loading huge bulks of records that you don’t actually need. a sync is required in order to get the data onto the device. and in some cases, you may have to clear the data from the device and sync again to get updates that you’ve done to the lookup tables. this is perhaps my own experience, but something you should investigate.
here’s a commcare documentation link on the subject of lookup tables

https://confluence.dimagi.com/display/commcarepublic/Lookup+Tables

one limitation here that is not deal breaking, but you should consider, is that you cannot update lookup data through form submissions. lookup tables are just that, tables you can look up. period.

HTH! and good luck


#4

Hi @Mazz and @Ethan_Soergel!

Thank you so much for your feedback - and apologies for the delayed response.
I’ll endeavor to pursue your recommendations and really appreciate your assistance.

Regards