Only show page depending on answer to question

1292
2
Jump to solution
01-22-2021 03:12 PM
CarolynKnight
New Contributor

I have an inspection survey with 3 pages. Page 1 is an introductory page with general questions one of which asks what type of inspection they're completing. Is there a conditional statement I can apply to this question that will then only show the corresponding relevant page? Something like: 

If(${InspType}="General",show row 10, otherwise show row 30

Page 2 (General Inspection questions) begins on row 10, and Page 3 (Detailed inspection questions) begins on row 30.

This is possible in the web design, but my survey was created using Survey123 Connect.

0 Kudos
1 Solution

Accepted Solutions
LeonardBarnhill
Occasional Contributor

I am sure there are other ways to do what you request but I have allowed the user to jump to various section using the following method.  I set up a question early in the form (page 1 for example) that asks what type of manhole inspection is being done.  Based on the answer, additional sections of the form become available.

Page one, the question "Inspection Status" is a required select_one INSPSTAT question where the user selects "Complete", "Not Found", "Not Opened", and a few other options.  If the user selection is "Not Opened", a section on surface conditions and related Photo section is available for completion.

The Surface Condition section is a group.  I have added the following statement to the Relevant column in the Survey123 Connect XLSForm: selected(${INSPSTAT}, 'COMP') or selected(${INSPSTAT}, 'NI') or selected(${INSPSTAT}, 'NO')

The "selected(${INSPSTAT}, 'COMP") checks for the user response of COMP from the INSPSTAT question.

COMP means complete inspection and the surface conditions are expected for this type of inspection.  NI means Not Inspected and NO means Not Opened.  In both cases, the user is expected to gather certain surface condition information.  Not Found or Buried status does not open the surface condition section since the manhole cannot be found and surface conditions are not expected to be recorded.

Hope this helps.

View solution in original post

2 Replies
LeonardBarnhill
Occasional Contributor

I am sure there are other ways to do what you request but I have allowed the user to jump to various section using the following method.  I set up a question early in the form (page 1 for example) that asks what type of manhole inspection is being done.  Based on the answer, additional sections of the form become available.

Page one, the question "Inspection Status" is a required select_one INSPSTAT question where the user selects "Complete", "Not Found", "Not Opened", and a few other options.  If the user selection is "Not Opened", a section on surface conditions and related Photo section is available for completion.

The Surface Condition section is a group.  I have added the following statement to the Relevant column in the Survey123 Connect XLSForm: selected(${INSPSTAT}, 'COMP') or selected(${INSPSTAT}, 'NI') or selected(${INSPSTAT}, 'NO')

The "selected(${INSPSTAT}, 'COMP") checks for the user response of COMP from the INSPSTAT question.

COMP means complete inspection and the surface conditions are expected for this type of inspection.  NI means Not Inspected and NO means Not Opened.  In both cases, the user is expected to gather certain surface condition information.  Not Found or Buried status does not open the surface condition section since the manhole cannot be found and surface conditions are not expected to be recorded.

Hope this helps.

CarolynKnight
New Contributor

Thank you so much! This was very helpful and works for what I need. I was mistakenly putting the statement in the initial question - not each question I want the user to jump to.

Also, I grouped my 2 sections to jump to into one overall section which helped a lot as well.

Appreciate your help!

0 Kudos