Select to view content in your preferred language

concatenate pulldata in survey123||concatenar pulldata en survey123

1886
5
03-02-2022 03:44 AM
JavierCMartínezPrieto
Frequent Contributor

hello everyone,

I would like to know how to perform the following operation.
I have a survey in survey123 that provides information through the pulldata. everything works perfect but when the information it shows is of a single object but when I want it to show me the information of several objects it only shows me the one of the first one selected.
attached image for better understanding.

I have 2 technicians selected but it only shows me the information of the first one, what should I do to show me the information of both?
in the csv those names are in the same column.
For now I can only get the concat to give me the same value twice.

i am used this expression in xls form:

JavierCMartnezPrieto_3-1646221359077.png

thank!!!!!!!!!!


#####################ESPAÑOL#######################

hola a todos,

me gustaría saber como realizar la siguiente operación.
tengo una encuesta en survey123 que proporciona una información a través del pulldata. todo funciona perfecto pero cuando la información que muestra es de un solo objeto pero cuando quiero que me muestre la información de varios objetos solo me muestra el del primer seleccionado.
adjunto imagen para que se entienda mejor.

JavierCMartnezPrieto_0-1646221252863.png

 

tengo 2 técnicos seleccionados pero solo me muestra la información del primero que tendría que hacer para que me mostrara la información de ambos
en el csv esos nombres se encuentran en la misma columna.
por ahora solo consigo con el concat que me de el mismo valor dos veces.

JavierCMartnezPrieto_1-1646221268239.png

esta es la expresión que utilizo en el xls:

JavierCMartnezPrieto_2-1646221326519.png

Gracias de antemano!!!!!!

 

Javier C. Martinez Prieto
5 Replies
Katie_Clark
MVP Regular Contributor

I was trying to do this same thing the other day, and unfortunately hadn't come up with a solution. Would love to know if you are able to find a work-around for pull-data with select-multiple questions!

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
AlexBakhtin
Occasional Contributor

Not sure if this would work with your survey, but you can potentially change your select_multiple questions into a select_one and put it into a repeat. From there, you can create a note (or text field) and use join() with a newline separator to get each iteration of the repeat. 

Here is a blog post talking about repeat aggregation that could also help (search for Aggregation Functions(join)).

https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-repeats/ba-p/89804...

Alex Bakhtin
0 Kudos
JavierCMartínezPrieto
Frequent Contributor

Good morning Alex,

I tried that method and the only thing I get is that the first answer is repeated but it does not extract 2 values from the same column.

thanks for your time.

greetings Javier

Javier C. Martinez Prieto
0 Kudos
MeghJones
Occasional Contributor

Not sure if you figured this out or not but here is what I do to accomplish the task you are mentioning. 

I use an external media .CSV file with this function written in the Connect form's Calculation column. 

concat((pulldata('yourchoices','OSHA','name',selected-at(${StairHandrailOneSideOpen},0))),(pulldata('yourchoices','OSHA','name',selected-at(${StairHandrailOneSideOpen},1))),(pulldata('yourchoices','OSHA','name',selected-at(${StairHandrailOneSideOpen},2)))). 

This code concatenated pulldata functions for every choice option within a question and you can add as many questions as you want into one function. 'yourchoices' is the name of the .CSV file in the media folder. 'OSHA' is the column name for the data I want displayed as a result. 'name' is the column name that corresponds with the domain code used for your selection choice list. The last part references the fieldname you want to pull the info from and what index value to use. (i.e. if there are 6 choice options in one question you would copy the code 6 times for that field name with different index values from 0-5). 

 

Hope this helps!! It works great for me. Feel free to reach out and ask any questions if you need. 

 

JWatson_Acela
New Contributor

Megh I am very intrigued! Do you mind sending me your .xlsx form so I can see how you have that configured fully? 

0 Kudos