Select to view content in your preferred language

Update csv pulldata file name

377
3
06-22-2022 09:32 AM
GregKeith
Occasional Contributor III

I use a csv file in the pulldata function to retrieve address data for a site. In development I named this file address_sample.csv. There are over 80 sites however, with multiple sites possibly being surveyed at any given time, so I'd like the file to be named after them, something like chicago_address.csv, liverpool_address.csv, nairobi_address.csv, etc. This would involve somehow dynamically changing the file name in the pulldata function, as far as I can tell. Is this possible? Thanks.

Tags (2)
0 Kudos
3 Replies
DougBrowning
MVP Esteemed Contributor

It works for me if I give it a field.  I have the calc for the name in the field then give that to pulldata.

DougBrowning_0-1655916270479.png

 

pulldata(${SpeciesListName}, ${WetlandIndicatorStatusColumn}, "name", ${Species})

Maybe you added .csv to it?  You should not have it be just the name.  And note it IS case sensitive.

Hope that helps

0 Kudos
GregKeith
Occasional Contributor III

Not using the .csv extension. Will try putting it into a field like you suggest. Would be nice if S123 could read the media folder and select a csv file with 'address' in the file name. 

0 Kudos
DougBrowning
MVP Esteemed Contributor

Yes that is what my form does.  I pass a state in from Field Maps then it selects the right species list to give them using a calc.

DougBrowning_0-1655927020858.png

It for sure works.  Try and field and make sure the case is correct.

0 Kudos