I can’t find a way to include 2 fields from the database in a single search constraint in “Do a search for”. This means I need to use :filtered/Advanced, which sends unnecessary amount of data from server to browser, as :filtered is done client-side. I’m wondering if anyone else has had to work around this, and how it was possible to do it?
In the database, I have two fields: “Location” (address) and “Radius” (number). Users search for other users by using “Property address” (address).
The ideal search constraint would be:
“Location” is within “Radius” km/mi of “Property address”; or
“Radius” > distance between “Location and “Property Address”;
or anything similar… basically 2 fields from the database used in single search constraint…
Any recommendations or ideas would be greatly appreacited!!
Just use Search condition 1 : merged with Search condition 2 (you can merges as many searches as you want)
Also, I remember reading something along the lines of :filtered not being a client side action from @georgecollier. Can’t really find the post right now. Is this true, @georgecollier?
I do not think you need to do any advanced filters or merged searches. I think all you want is to use the stored ‘radius’ numerical value and the stored ‘address’ value to find locations that are within the radius and address of the user.
There’s still no way to do this properly for the Searchbox element right? You have to literally just create a separate data type with the fields merged together into a single “combo” field?
Currently, “Location” and “Radius” are saved under a data type “AR”. This is because users can create unlimited “AR”s, each with their specific Locations and Radiuses (each AR can have up to 10 locations and 10 respective radiuses). I was thinking of moving these two fields to User, but because theoretically there could be unlimited inputs I’m not sure how to manage them. So ideally they remain in the database under each AR.
The “Do a search for” is done in a RG, so each constraint needs to reference each thing’s fields.
Maybe there is calculation which can be done in each search constraint, to calculate the distance between “Location” and “Property address”, which can be then written in the search constraint as “Radius” > “distance(calculation)”? Then I could apply :merged with (to merge 10 “Do a search for”s, each for a different location)