Select to view content in your preferred language

How do I populate different text/integer fields with multiple columns in choice list from select_one choice?

677
3
05-12-2022 04:26 PM
archeomason
New Contributor III

Hello, everyone. I'm trying to figure out how to populate text (or integer, or date, or whatever) fields on a form with data from a choice list table based upon a user's selection from a select_one (or maybe select_multiple) type question.

For example (though, not my actual survey), if I had an "Employees" choice list that looked like this:

Name              |            Label       |       Initials     |  Birthday  |     Years

BobTurner      |    Bob Turner     |        BT           |   05/15      |          12

SallyJones      |     Sally Jones     |       SJ             |    01/28    |           3

AlanSmith      |      Alan Smith     |       AS            |     10/31    |          6 

etc.

and had a ${EmployeeChoice} as a select_one field.

Can you code a ${EmployeeInitials} text field, a ${YearsWithCo} integer field, and/or a ${Birthday} date field based upon a user's selection in the ${EmployeeChoice} question?

I've tried  the selected(${EmployeeChoice},Initials) code in the calculation and choice filter columns but it doesn't seem to work. 

I suspect that this is a really basic question, but I just haven't had luck finding a solution, so I'd appreciate anyone's help.

Also, while I'm at it, is there a way to record the jr:choice-name of a select_one/_multiple question straight away or do I have to create a separate text field that has that jr:choice-name function mapped to it? It works fine with the latter, I just was wondering if there were a simpler option that I wasn't aware of. 

Thank you everyone! 

Mason

 

0 Kudos
3 Replies
DougBrowning
MVP Esteemed Contributor

Take a look at pulldata for this.  You can pull the values from the csv.  

archeomason
New Contributor III

Thank you... I'll try that. But if this is a list that's just in the "choices" tab, would it still work? I suppose I can just test it and see.

 

0 Kudos
DougBrowning
MVP Esteemed Contributor

I think you use itemsets for that.  Not positive now I forget.  If not just move it to a csv or external_choices.