I’m displaying data in a list and doing a search for any field contains the input search’s value. It seems like this search ignores fields of type “geographic address”. Why is that? How do you search through geographic addresses? Do I need to separate and break up the address into its individual components and store them in their own fields in my database in order to be able to make it searchable?
@emmanuel I’m not sure if the question above was missed, but I’m having issues searching geographic addresses. It seems like they are ignored when performing a search. Please see above.
Can you reproduce in the forum app? A lot of users use geographic searches and that works fine, so I guess there is something weird with your set up. We need to see what you’re doing to help.
I just noticed that you have a search box as an input! I can’t believe I hadn’t seen that before because that’s what I was trying to create.
It seems to have some issues though. In the “Field to search” drop down, it only shows 2 of the 8 fields I have in my data type that I’m searching. Also, why isn’t the option to search any field available?
You are right, it is pretty tricky to do this right now.
Some options…
use the native geo- search, and then use an advanced filter on the addresses formatted address.
Pull out the formatted address into a separate field and search on that.
Use a dropdown instead
What alexis is trying to do (if I am reading this correctly) is have the type-ahead search work on a field that is a geographic place. So exactly like the geo-search, but only places in his database.
Yes this is not something that we can do currently for database/backend reasons. Autocomplete works with text fields, which is why not all fields are shown. When using the search box with geographic places it’s a completely different mechanism as we use the Google Places API to provide results.
I see.
Can you add the ability to search “any” text field in the search box input, so we don’t have to choose which specific one and we can just search them all?
What benefit or difference is there to saving a location to type “geographic address” vs type “text” field? I added a 2nd field to my db called Location Text (of type text) where I’m saving the current position’s formatted address. In my Location field (type geographic address) I save the current position. When I look at the app data in the data tab, both those fields look identical. Is there a difference between them?
I’ll put that on our list. It’s not an easy fix, require some database architecture work. We’ll we’ll add that at some point.
Saving addresses as geographic address lets you have them on a map, search by location, sort by distance, etc. All the kind of things you can’t do as a text. But you can definitely have 2 fields so that you can search by text for autocomplete and use the other field for location based stuff
And to make the search work (Button Search is Clicked) display list in your repeating group then (Data source) Do search For What ever your searching
and for the location it within x of your input.
It’s 2020 and this advice to break out address text into a separate field for searching is still helpful since we can still only search addresses within a radius and not for an exact match. I encountered this while trying to differentiate between units in an apartment building. Two different units are both “Within 0 miles” of each other, but their text addresses are not the same because they have different unit numbers. @emmanuel