Hide a group in Survey 123

1563
6
12-14-2020 11:11 AM
LindseyStone
Occasional Contributor III

How do I hide an entire group in Survey 123 via Connect instead of hiding individual questions.  I have a series of questions established that I only want the the office staff to see or edit after the survey is filled out via an editor web application.  I have two select one lists and a date field that all autocomplete to an answer.  I also have a blank text field.  I do not want to set it as relevant because the answers that autocomplete is not based off any other question so if I set a relevant statement than it doesn't autofill those answers.  Looking at this article https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformsappearance.htm it appears you can hide an entire group at once using the appearance field.  But there is no hidden option in that field or in the types worksheet for appearance.  I'm on Survey 123 Connect v3.11.123 which I think is the most current version.

Tags (2)
0 Kudos
6 Replies
LeonardBarnhill
Occasional Contributor

This may not be the only way to accomplish your "challenge" but I handle this by creating a new question early in the form that asks what type of inspection is being completed - Level 1 or Level 2.  When the user answers, it controls which groups are shown in the form.

 

The initial question is named Level (in the name column).  This is a required response.

On the begin group lines, I add the following under the relevant column - selected(${Level}, 'Level1)  - to activate the appropriate groups for Level1 survey.

Hope this helps

Jim-Moore
Esri Regular Contributor

Hi @LindseyStone 

To hide a group, enter 'hidden' in the appearance column on the begin group question. Any defaults or calculations on the questions inside the group will be retained.

The XLSForm you provided is using an older version of the Survey123 template, so 'hidden' is not available in the drop-down for appearance; however, please note that the data validation for the various columns in the XLSForm template serves only as a guide (you can change this as required). The latest versions of the Advanced and Standard templates (available in Connect) include 'hidden' in the drop-down for appearance (this appearance was introduced in 3.11).

Also note the 'autocomplete' appearance is for select_one questions and allows the user to start typing an entry into a text box, which then filters the list of choices as they type; it does not apply to dateTime questions or any other question type (and is of no use for hidden select_one questions).

Hope this helps

Best,

Jim

0 Kudos
LindseyStone
Occasional Contributor III

Can I convert the form to the new version and just replace the existing hosted feature.  Just by downloading the form to Connect and then adding all my new calculation fields and a few other fields it created a brand new layer and I had to reset up all my maps.  I would love for this to me on the newest version but not have to completely set up my maps AGAIN!.

0 Kudos
Jim-Moore
Esri Regular Contributor

Hi @LindseyStone 

Just to clarify, the XLSForm templates are updated with each release of Connect to ensure all of the supported question types, appearances, columns, etc. are in the template - however, the template version you're using doesn't matter; the Survey123 software version will determine if a feature is supported or not. 

If you'd like to use the latest XLSForm template for your survey, you can copy and paste the content from the old XLSX file into a copy of the new one. Then replace the old XLSX file in the survey's folder with this new one (with same filename). It's recommended to use 'paste values' so that you do not disrupt the data validation. Please see the instructions/tips in the Migrate an existing survey to a new template section in this blog post for more details.

Regarding creating a new feature layer: for a survey that's already published, some subsequent changes to the XLSForm (e.g. changing a question's type) will cause the feature layer to be rebuilt; other changes can be made while retaining the existing feature layer (e.g. modifying a calculation on a question). For more on this please refer to the Update surveys section of the documentation.

Best,

Jim

0 Kudos
LindseyStone
Occasional Contributor III

So the survey was originally set up as a web form and then I updated it via Connect so the XLSForm must have stayed as the original version which is why I'm not seeing the new hidden appearance.

0 Kudos
DougBrowning
MVP Notable Contributor

I am not sure how to do it in a webform but in Connect use the new column body::esri:visible.  This hides like a relevant but does not change the data to '' like a relevant.  Add to the line of your begin group.

Hope that helps

0 Kudos