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

What is the syntax for query for non-empty fields? #35

Open
dmichael opened this issue Dec 14, 2015 · 1 comment
Open

What is the syntax for query for non-empty fields? #35

dmichael opened this issue Dec 14, 2015 · 1 comment

Comments

@dmichael
Copy link

The documentation in FileMaker says to use a *, but using a start for a field does not seem to do what I think it would. What then is the syntax for finding all records where a field is not empty? Thanks!

http://www.filemaker.com/help/12/fmp/html/find_sort.5.10.html

@ginjo
Copy link
Owner

ginjo commented Dec 14, 2015

The star character should work, but I usually use the equals '=' character to omit all records with nothing in the field. In Rfm, that would look like this...

Reservation.find(:some_field => "=", :omit => true)

I do remember, long ago, having some issues with the star technique, but I don't remember why.

You might also double-check your request logic. If you have multiple find requests in a single find operation, remember that 'omit' requests will filter preceding requests. So something like

Reservation.find([{:some_field => '*'}, {:some_field => "b",  :omit => true}])

will find all records with something in some_field, unless some_field contains a word starting with 'b'.

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