Hello,
I have a linked CSV file that has per diem rates in it. I am trying to use the pulldata function to bring in rates based on the zip code and fiscal year. The function works perfectly in Survey123 Connect version 3.18.124 and in the survey app however it won't load anything when using a web browser. I can't figure out why it works in the app but not on the web. I have a different CSV file for employee information in this same form using the same functionality and it works perfectly.
Here is the calculation. "per_diem_rate" is the name of the csv files, meals is where the number I need returned is location, zip and fiscalyear are the two fields I am filtering by.
pulldata('per_diem_rates', 'meals', 'zip', ${class_zip}, 'fiscalyear', ${class_year})
Solved! Go to Solution.
Hi,
What you're doing makes sense, but I don't see anything in the pulldata doc that supports multiple criteria like you've specified. I recommend that you request this as a new feature.
In the meantime, a crude workaround would be to concatenate the zip and fiscal year columns into a third column in the CSV and then do a single criteria lookup based on that other column.
Let's call that third field fiscal_year_zip. Concatenate the fiscal year and zip fields into that third field with a - (dash) between the two fields for readability. You can do this automatically with an Excel concat function, but understand that the function will be collapsed to values when saving the CSV file.
You could then revise your pulldata as follows:
pulldata('per_diem_rates', 'meals', 'fiscal_year_zip', ${class_zip}-${class_year})
I'm doing this off the top of my head, so I might well be missing something.
Chip
Hi,
What you're doing makes sense, but I don't see anything in the pulldata doc that supports multiple criteria like you've specified. I recommend that you request this as a new feature.
In the meantime, a crude workaround would be to concatenate the zip and fiscal year columns into a third column in the CSV and then do a single criteria lookup based on that other column.
Let's call that third field fiscal_year_zip. Concatenate the fiscal year and zip fields into that third field with a - (dash) between the two fields for readability. You can do this automatically with an Excel concat function, but understand that the function will be collapsed to values when saving the CSV file.
You could then revise your pulldata as follows:
pulldata('per_diem_rates', 'meals', 'fiscal_year_zip', ${class_zip}-${class_year})
I'm doing this off the top of my head, so I might well be missing something.
Chip
Thanks for help! I had to create a separate field in survey123 to concatenate the ${class_zip} and ${class_year} fields but I was able to then filter by the new field and it did work on both the app and web. I will put in for a feature request to be able to filter by multiple columns.