Select to view content in your preferred language

Can you have a dynamic response in a survey in a repeat question format?

358
4
03-05-2025 11:03 AM
RachelWhittington
New Contributor

I'm trying to create a dynamic response question within a repeat. The repeat question is asking if the identified color and percentage of color is a redox or matrix feature. The goal is that when the user selects "redox" an additional question pops up asking what type of redox feature is present. However, with the current code and format, the dynamic response isn't working in the survey. Any advice? Does it have something to do with the "Appearance" column? Currently, the appearance for both is minimal. I have code in the body::esri:visible column that reads ${profile_feature}= 'Redox'. Both of the questions are select_one from lists. 

 

0 Kudos
4 Replies
DougBrowning
MVP Esteemed Contributor

Is Redox the value in the label column or the name column in the list?  You have to use name.  I personally make sure my name and label always match exactly.   I often see name is yes and label is Yes and that will drive you nuts.

0 Kudos
abureaux
MVP Frequent Contributor

I would recommend using selected() rather than =. Selected is universal (works for select_one and select_multiple) and can avoid future issues. E.g.,

 

 

 

selected(${profile_feature},'Redox')

 

 

 

As @DougBrowning mentioned, use need to use the [name] column, not the [label] column. E.g., to make a formula for yes_no (see image below), you would use the lowercase "no", which is the [name]. It would look like selected(${question_name},'no')

abureaux_0-1741205833757.png

EDIT: And one last thing. Whereas you are using [body::esri:visible] rather than the [relevant] column, just be aware that [body::esri:visible] just makes fields invisible. That means if you make your Redox field required, but then it isn't visible, users wont be able to progress in the form. If you want to use [body::esri:visible] and have a field be [required], you can always use a formula in the [required] column to dynamically make the field required=yes.

0 Kudos
DougBrowning
MVP Esteemed Contributor

I thought they fixed the checks on not visible fields issue?

0 Kudos
abureaux
MVP Frequent Contributor

You are correct! Must have missed that note.