Select to view content in your preferred language

pulldata function not working in survey

1411
8
Jump to solution
05-01-2023 09:38 AM
dwold
by
Frequent Contributor

I am trying to pull data from a CSV file in my media folder. However, the survey is blank where that information should appear. Is my pulldata statement not correct?

Form:

dwold_0-1682958995942.png

CSV lookup table:

dwold_1-1682959046878.png

Survey:

dwold_2-1682959096079.png

 

@ZacharySutherby 

@DougBrowning 

@IsmaelChivite 

@Katie_Clark 

 

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

Did you test all or just some options.  I see in the csv that some values like City of Seattle  have an extra space at the end of the value.  Emergency Management  in the form list has it also.  A bunch of agency_type_king list has the extra spaces.   core_capability list also.  Gotta clean up all of those.
 That could be it.  Copying from word does this a lot and burns me on the reg. 

View solution in original post

8 Replies
DougBrowning
MVP Esteemed Contributor

I would start by checking your csv in notepad and not excel.  You have trailing and leading commas in your data csv which can often cause issues since it messes up the commas used to separate values.  In general commas and csv do not mix well.  Remove them or make sure your CSV is quoting them properly.

Also you have a field called time but that is a reserved word (see the tab for that) and it should have gave you a green box mark on that one.  Looks like you edited the excel sheet formatting and possibly the formulas behind that.  I would not edit the excel and make sure to always use Paste Values or all the validation gets messed up.

Oh and filter is a reserved word also so not sure what that will do.

Hope that does it.

0 Kudos
dwold
by
Frequent Contributor

@DougBrowning thanks for those suggestions., I appreciate it. I stripped out all the commas and periods in the csv table. Changed time to time_frame and filter to filt. I've attached my CSV file. Verified column F in CSV table is a value, not an expression. Still getting no info to display on the survey. Do you see anything else that I am doing wrong/missing?

Form:

dwold_0-1682963766587.png

CSV:

dwold_1-1682963832983.png

 

0 Kudos
DougBrowning
MVP Esteemed Contributor

Can you post the form also?    Also why not just use jurisdiction column?

0 Kudos
dwold
by
Frequent Contributor

@DougBrowning 

I've attached the form. The CSV table I will be using has 340+ rows not 6. Can I still only use the jurisdiction column with that many rows? I've attached what I intend to use as my final CSV file. The one I previously attached was a dumbed-down version.

Thanks for taking a look.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Did you test all or just some options.  I see in the csv that some values like City of Seattle  have an extra space at the end of the value.  Emergency Management  in the form list has it also.  A bunch of agency_type_king list has the extra spaces.   core_capability list also.  Gotta clean up all of those.
 That could be it.  Copying from word does this a lot and burns me on the reg. 

dwold
by
Frequent Contributor

Does having special characters in the choice list do any harm? Firefighting/SAR/HazMat or Finance & Administrative Services?

0 Kudos
DougBrowning
MVP Esteemed Contributor

I do not love it but I have got them to work I think.  It is probably the extra spaces that has got me before. 

0 Kudos
dwold
by
Frequent Contributor

Removing the extra spaces worked! Thanks again!