Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search Result Set #20

Open
sancheas opened this issue Sep 5, 2014 · 1 comment
Open

Search Result Set #20

sancheas opened this issue Sep 5, 2014 · 1 comment

Comments

@sancheas
Copy link

sancheas commented Sep 5, 2014

I'm pulling down my results specified by the client, without using elastic search, is there an easy way to search results, outside of the .find method?

For example I find all my data and store it in @fmResults

@fmResults[0] = {:field1 => "Duck", :field2 => "123", :field3 => "Kyle"} 
@fmResults[1] = {:field1 => "Cat", :field2 => "234", :field3 => "Jim"} 
@fmResults[2] = {:field1 => "Dog", :field2 => "567", :field3 => "Alex"} 
@fmResults[3] = {:field1 => "Ardvark", :field2 => "890", :field3 => "Jim Bob"}
  • If i search "23" it should return @fmResults[0] & @fmResults[1]
  • If I search "Jim" it should return @fmResults[1] & @fmResults[3]

I know I can build a form with all the fields and pass them to the RFM .find method, but that is going to involve multiple search fields for each field and I'd prefer to have a single field.

Thanks for any suggestions

@ginjo
Copy link
Owner

ginjo commented Sep 29, 2014

Several ways to create complex rfm searches with simple front-ends (a single-field search form).

  1. An Rfm resultset is just an array, so you can use any ruby method that iterates over the array to filter specific records.
  2. Use a single field on your search form, then programmatically build a compound rfm find request where the search criteria is inserted into multiple find-requests, with each request focusing on a specific field of your layout.
  3. Create a calc field in Filemaker that concatenates the fields you want to search on, index that calc field, then perform your rfm query against that calc field.

Each of these have benefits & costs, and there are probably yet more ways to do this. These are just the ones that come to mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants