I'm trying to create a two-part cascading dropdown in a Survey123 Connect XLSForm where the second list is filtered based on the selection from the first. Despite troubleshooting for a while, the filter isn't working, and the second list remains empty. I'd appreciate any guidance on what I might be missing.
What I'm Trying to Do
My goal is to first have a user select a department and then have a second question display only the sections related to that department.
My Data Source
I'm using a hosted feature layer in ArcGIS Portal named "Department and section" with two related tables:
department table (Layer 0): Contains a list of departments. Key fields are Department_id (Double) and department_branch (Text).
section table (Layer 1): Contains a list of sections. Key fields are department_id (Double) and section_name (Text).
The Department_id in the department table and the department_id in the section table are correctly related (e.g., department with Department_id 16 has sections with department_id 16).
My XLSForm Configuration
Here is how my survey worksheet is configured:
Department Selection Question:
type: select_one departments
name: manual_department_name
appearance: search('Department and section?url=...')
Section Selection Question:
type: select_one sections
name: manual_section_name
appearance: search('Department and section?url=...')
The Problem
How can I
filter the sections by the department selection.
Conditionally show the section question only if the selected department has at least one section. (There is a filed has_section in the layers with the type of text and the values of true or false)