Hello! I need help with controlling search results. I’m basically building a niche business listing application and would like it to do the following: User enters a search term in the input box, an address into a search box, and sets the radius slider. Upon clicking the ‘search’ icon, the app will then display a list of businesses that meet the criteria. They are also displayed as pins on a map.
Here’s a more detailed description of how I currently have set this up:
The search term is found in the input box
The location is found in a searchbox that is set to ‘geographic address’
the radius is the value of a slider input
The ‘button’ is actually a magnifying glass icon.
The search function is handled by Search&Autocorrect plugin
The results display is a repeating group
My workflow looks like this:
When the search icon is pressed, set custom state of the results display (repeating group) to be a list of Search&Autocorrect’s matches, and the data source for the results display is the custom state. I did this so the results won’t dynamically update as the user types in the input box. This way, the results stay there as the user types a new search and don’t update until the button is pressed.
There is a constraint set within the Search&Autocorrect element that says the Virtual Booth (type) 's Location (geographic address field of type Virtual Booth), must be within “radius’s value” of “address input’s” value (searchbox with geographic address input):
Here’s what happens:
Page is loaded - no problem.
Type “custom” into the input box, select “Golden, CO” in the location box, set radius at 20, click magnifying glass - nothing happens. Using the step-by-step tool shows that Search&Autocorrect pulled no matches.
-HOWEVER-
If I then erase one letter of my search and retyping it, so it’s the same (“custom”), and click the magnifying glass again, it pulls the correct results! Where have I gone wrong here? Any ideas why it doesn’t work the first time but works after that?