Preload a select one type with another question

Dear community members:

I have a text field “name of actions” that will collect as many actions as necessary (eg. run, walk, sing, etc). I have a second field where you can choose the most important action and report the “time spent” on that action. This second question would be of the select one type. Questions: can I get the list of options for question two to be built while answering question 1 (text)? I appreciate any help or suggestions you can give me.

@Sebas-Celade, so you expect to split the run, walk, sing that was all collected in the same text variable?

In principle, yes. but I can also collect the actions separately, as they are added using a repeat group. How viable would this alternative be?

Thanks Kal_Lam, I found the solution at
https://docs.getodk.org/form-logic/#generating-select-ones-from-repeats

Best regards

1 Like

Dear community: I thought I had figured out how to build a select one from a text field, but I was wrong. I need your help to continue advancing in the survey that I am building.

In this way of working the result is fine. every time a new action is added in the repeat group “For tests”, the select one “Action Name” is incremented

type name label required calculation
begin_repeat prueba_acciones Para Pruebas
text nombre_acciones Acciones false
select_multiple fm5ux74 Capitulos_CMPD Cpitulos CMPD false
text Responsable Responsable false
end_repeat
select_one ${nombre_acciones} Nombre_de_la_acci_n Nombre de la acción false
calculate version ‘vMAUB3BAtDz6tRo2CfoqVK’


Action02
Action03
ActionName

But I need to set the select one “Action Name” inside a repeat… if I do it the result is the following:

RepeatRes

Thanks for the help you can give me.

1 Like

@Sebas-Celade, :clap: :heart: :partying_face: