Search Appearance inside Repeat does not save selection

12-03-2021 10:58 AM
New Contributor III

I am creating a survey with Survey123 Connect (Version 3.12.232) for field inspections at construction sites. My construction (point) feature layer is related to an inspection table. I am using a series of select_one questions with search() appearance to populate several dynamic lists from the construction layer. I use these selections to filter down the project name, construction type, and location to identify the actual construction site that is being inspected. I have two select_one search appearance questions inside a repeat (ideally they will stay within the repeat). I use these selections as variables in a pulldata() function that queries my feature layer and returns attributes for the selected construction site.

This workflow works great for only the first repeated record. When I add a new repeat, the selections in the previous repeat become unselected and I lose the pulldata() values. I think this error is because I am using the search appearance; it looks like the select_one is not maintaining the dynamic list when a new repeat is added. Any thoughts as to why this might be happening?

1 Reply
New Contributor III

@KimberlyMcCallum Hi Kimberly! This was my original post to my "Dynamic Choice Lists using Search Appearance" dilemma. Unfortunately, I have not found a solution. I'm thinking the problem lies within the fact each time a repeat record is added, the search() is run and it pulls fields from the feature service all over again, consequently clearing selection of the previous repeat. 

As a workaround, I moved the select-one search() questions outside my repeat and added text fields inside the repeat with the calculation set to the select-one questions. If the text field is set to read only it will not recalculate when a new repeat is added and the value within the repeat will reflect what was selected. At least in may case, the functionality of the repeat is now how I want it. But, the select-one question is still selected and there is nothing prompting the user to select a new choice from the list, so it's a little clumsier and not ideal for someone who's not familiar with how Survey works.

0 Kudos