Select to view content in your preferred language

Not able to pull data from csv file into the survey drop down question

952
4
Jump to solution
10-15-2022 01:37 PM
Shubhreet1
Emerging Contributor

I am new to survey 123. I am trying to pull data using pulldata() function from a csv file into my survey but after adding the pulldata() functions and saving the form , I do not see any corresponding changes in my form. 

I receive the following error on updating the form: b'ODK Validate errors:\n>> XForm is invalid. See above for the errors.\norg.javarosa.xform.parse.XFormParseException: Invalid Calculate for the bind attached

Please see the following pictures for reference. On selecting the option for 'Name of the Personal Care...', I do not see the information for region, prime contact and email. Could anyone please assist me. 

Thank you in advance. 

Shubhreet1_0-1665865993176.png

Shubhreet1_1-1665866043370.png

 

 

1 Solution

Accepted Solutions
ChristopherCounsell
MVP Regular Contributor

For calculations, fields (name column) should be referred to as ${fieldname} not ${fieldname)

Try changing the calculation to refer to the field as ${name_of_the_personal_care_home}

View solution in original post

4 Replies
ChristopherCounsell
MVP Regular Contributor

For calculations, fields (name column) should be referred to as ${fieldname} not ${fieldname)

Try changing the calculation to refer to the field as ${name_of_the_personal_care_home}

Shubhreet1
Emerging Contributor

Thank you Magisian. The error you detected did help me sort the things out. 

CarissaPhantom
Emerging Contributor

You mentioned you are new to Survey123, and I'd like to share the best beginner hack out there.

Build your survey incrementally.

Add your notes, then the select_one and PUBLISH to make sure those work first.

Now play with the Pull() code, until you get it to work, and the PUBLISH.

Now copy and paste the working code to the next fields and change the pieces that need to be changed.

0 Kudos
CarissaPhantom
Emerging Contributor
0 Kudos