Select to view content in your preferred language

Conditionally required question works in Survey123 Connect desktop testing but not in published survey

442
5
Jump to solution
02-25-2025 07:57 AM
AnninaRupe1
Frequent Contributor

I have a survey where if a user has (a) file(s) that contain existing geometry, they mark a select_one question "Yes" (the only option) and then are asked to attach the file(s) in a subsequent question (file_repeat). I have entered the following into the file_repeat question's required field, so the survey can't be submitted without adding an attachment: selected(${exist_geo},'yes').

In testing in Survey123 Connect, the survey displays as it should:

AnninaRupe1_0-1740498324839.png

However, when filling out the survey on a browser after publishing in Survey123 Connect, after the user selects "Yes," the "Attachments" section does not toggle to "Required" and the user can submit the survey without attaching anything:

AnninaRupe1_1-1740498489757.png

In the Excel spreadsheet, the "Field Type Information" for the required cell displays this data validation error:

AnninaRupe1_3-1740498858385.png

AnninaRupe1_2-1740498570312.png

I have tried:

  • Changing the required field to "yes" and entering "selected(${exist_geo},'yes')" to the constraint field
  • Changing "yes" to "Yes" in selected(${exist_geo},'yes')
  • Changing single quotation marks to double in selected(${exist_geo},'yes')
  • Moving selected(${exist_geo},'yes') to the required field in the file record rather than the file_repeat record
  • Updating Survey123 Connect to the most recent version

 

Help!

@DougBrowning 

0 Kudos
1 Solution

Accepted Solutions
AnninaRupe1
Frequent Contributor

Talked with Esri Tech Support and found that the issue is fixed if the appearance setting that I entered (minimal) is removed so the cell is empty. Not a huge deal for me to keep the question expanded. Just thought if anyone else was having this issue that I'd let people know of the solution! 

View solution in original post

0 Kudos
5 Replies
LaurenceTait
Frequent Contributor

Try 

${exist_geo}='yes'

0 Kudos
AnninaRupe1
Frequent Contributor

Unfortunately that gives the same behavior. Works in Survey123 Connect but not in the actual survey.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Sorry I do not know but the web forms do work differently.

I would try moving the check to the relevant column then using just yes in the required if that works for your workflow.

0 Kudos
AnninaRupe1
Frequent Contributor

Thanks for your response. I've tried this but it doesn't work. 😞

@ZacharySutherby @JenniferAcunto 

0 Kudos
AnninaRupe1
Frequent Contributor

Talked with Esri Tech Support and found that the issue is fixed if the appearance setting that I entered (minimal) is removed so the cell is empty. Not a huge deal for me to keep the question expanded. Just thought if anyone else was having this issue that I'd let people know of the solution! 

0 Kudos