Dynamic questions- Help


I am developing a questionnaire where one of the questions depends on a previous response. For example the respondent is asked which month did you visit health facility for contraceptive
the next question should be in (Month selected in question X), what challenges did you find in that facility

How do I generate a dynamic question t as above


You can reference the answer of a question in the label of another question.
Let’s say that the first question name is [contraceptive_month]
In your second question label you can write it like this :

In ${contraceptive_month}, what challenges did you find in that facility ?

here the doc about this feature :

hope that’s what you where looking for

1 Like

Thanks, This works. what I was looking for exactly!



I am struggling with getting with referencing the response to a Select One question and show the response’s label (e.g. “Strongly agree”) instead of its encoded value (e.g. "5). Any guidance/tips how to go about it?



In this case you must be able to add some additional code to it and probably an intermediate hidden question to it.

First step I would assume your first question is Q1 with responses being 1= Strongly Disagree and goes upto 5=Strongly agree.

You can create a dummy calculate question Q1d which is a text question and add the calculate formula if(${q1}=1,“Strongly Disagree”,(if{q1}=2,“Disagree”,(if${q1}=3,“Neutral”,(if${q1}=4,“Agree”,“Strongly Agree”))))

You can then reference the Q1d dynamically ${Q1d}

You can also use the jr:choice-name() function to lookup the label associated with a value in the select_one/select_multiple question’s item list. eg

calculate = "jr:choice-name(${selected_value}, '${my_select_question}')"

[note, if its a select_one, then you can simply substitute ${my_select_question} for ${selected_value}, since its the same thing]

Here’s a sample form with a select_one:

choice-name.xls (5.5 KB)


I try use dynamics questions following up on a ‘select many’ questions. I’ve created two dynamic follow-up questions for every answer category and gave them different data column names. Nevertheless, when I preview and select several answers, they all appear in one follow-up question (see image). I’ve attached my xls here.

Thanks for your help!![

(upload://etvvtV8qD1qdFP8fJvmT9ehZ2Q7.png) aEXisthqLYKCeGJzMAb3hF.xls (37.5 KB)

Hi @fmolenaar
Essentially this would not create for you multiple questions when multiple responses are selected. The workaround is to create a follow up question for each response options and then set them to conditionally come up when that option is selected. In this logic, if you have 10 response options then you will have to create 10 different followup questions.

Important question would be how you want to analyze the 10 questions.

Hi Stephane,

I did indeed create 10 separate follow-up questions and made them conditional on the answer given to the first question. But all this does is create follow-up questions that list all the answer categories.

I noticed your problem is actually the reference to the question. This will pick all the responses. The logic for me would be very simple: you have 10 questions, make each question specific for each response within the text and skip routine see below


1 Like