Select to view content in your preferred language

Autofilling multiple select_one fields using CSV

557
2
01-21-2025 06:42 AM
spf999
by
Emerging Contributor

Hi all, 

I am currently upgrading my survey for the next field season and have run into some issues. My goal is to have some select_one questions survey auto filled, based upon the sample ID that is entered. I have a CSV that will be updated prior to each field outing, and it is uploaded to the media file within the Survey123. I hope to have the sampinfo_type, sampinfo_filterps, sampinfo_prestype select_one fields auto populated with the values found within the CSV as these values are project specific (within the choices that are already determined). My main motivation for this is to mitigate data entry errors and make the survey less time consuming for the field staff. 

Based off my brief research, pulldata() does not seem to be compatible with select_one questions, is this true? 

I've attached my survey XLSX sheet as well as the CSV file in which I'd like to auto populate from. 

Any suggestions will be much appreciated! Thanks for your help in advance! 

0 Kudos
2 Replies
ZenMasterZeke
Frequent Contributor

If there aren't dozens of possible values to auto populate, you can do this directly in the calculation field of sampinfo_type, et al., using an Iif statement. Here's a post to get you started.

0 Kudos
LaurenceTait
Frequent Contributor

Pulldata is perfectly compatible with select on questions. However I'm struggling to understand what you want to do, or why. If I understand correctly:

Your aim is to reduce errors and time.

The sample information for each project is invariant and project specific.

There can only be one correct value for sampinfo_type for any project.

If that is the case, I can't understand why you are asking your operators to provide you with the values for sampinfo_type by selecting one correct answer from a list of many.  You know already know what the single correct answer is, why don't you just present that value as a note to tell the operators, rather than asking them to tell you? That would save time and and reduce errors.

The only way I can see this making sense is if the sampinfo_type has multiple possible values, and you only want the  operators to be able select  the values that are possible for that project. It' simple enough to do that using a cascading select  select_one_from_file.

I've attached an example table below presenting both these options Hopefully one will provide enough info to construct what you want.

0 Kudos