A long as it is not a field from a related table, you can enter a lone = operator in the field to find all records where this field is empty.
For some scripted find examples--including the use of = to find records with empty fields, see this thread: Scripted Find Examples
Hi. As mentioned above this is a checkbox. How would one enter an operator into the checkbox? If I click the field in find mode it simply checks/unchecks the box.
With it checked I can find checked records. With it unchecked it finds all records.
very simplest way is to set the Matching Records button to 'Omit' when performing the find
Start a search, select the checkbox you don't want, then select omit to exclude records that have that checkbox
- this is also easily scriptable by negating the criteria, either in the Enter Find Mode step or as a Set Field step
Hmm... Interesting idea, but that didn't work as intended.
Let me explain. There are two types of Customers: (1) Ones who need to provide the info and (2) Ones who don't need to provide the info.
The checkbox indicates who has provided the info.
So if I do a search for Customers who have provided the info that's ok, because only Customers who need to provide the info would have.
But if I do a search and omit the checkbox, then all Customers records of those who have not provided the info are returned in the found set - whether they need to provide the info or not.
In other words, if I set omit it sets omit for both fields: the checkbox and also the field that shows whether the customer needs to provide the info or not. It doesn't look like I can set omit for one and include for the other. Or is there? It seems that when I press include or omit it toggles the setting for all the fields I've selected.
Maybe a two-step search is needed? (1) Find all the Customers who need to provide the info and then (2) a second, narrowing search where I omit just the checkbox. Is a search following a search to winnow the search possible?
The two-step approach I mentioned above works, thanks to your hint about the omit.
After Find 1, then ender FInd mode again, choose Requests > Constrain Found Set, choose the checkbox and omit and search again. The set I'm looking for is found.
However, it doesn't look like the contrained found set can be saved as a find, can it?
Yes, but you'll need to do some scripting - AND searches typically involve 2 or more consecutive Set Field steps, whereas OR searches need 'New Record/Request' between the Set Field steps....
/para (for whatever reason, carriage returns have no effect when I post to this forum)
also have a look at Specify Find Requests in the Enter Find Mode script step, and Constrain Found Set - I suggest a bit of trial and error to see what works best for you ...
sorry - my post went out before I'd read your last...
no you can't script to save found sets - unless it's a new feature in FMP12, but of course you can display/print/export that set
Yes, that's what I've been doing with certain found sets - exporting to Excel, usually to pass on the information to somebody else. This is nicely powerful - I would find it hard to get that kind of export out of Excel itself. I'd find myself creating extra spreadsheets and whatnot. FMP is definitely a time saver.
Having the ability save a constrained search would be handy though! :)
One option for making this more easily repeatable is to script the process of performing the find and exporting the data.
One way to manually search a check box field using the lone = operator is to place a copy of this field on your layout formatted as an edit box and put your = sign in there.
Yes, that looks like it would work.
By the by, the * and @ operators work in unexpected ways.
@ is supposed to match any one character. So I thought it would find all non-empty fields. However, it only returned two of the records where there was content in the field.
* is supposed to match 0 or more characters, which sounds like it matches everything, if you think about it, but it in fact matches just non-empty fields.
I'm not sure what @ is finding.
Say you had
will find the fist three, but not the fourth.
Ps. this little gem often trips people up when they are searching for email addresses due the the @ symbol that is part of the address. To get a character such as @ to be used as a character and not a wild card operator, enclose it in quotes.