May 29, 201312 yr There is probably a simple solution for this, but I can't seem to find it. I have a field called "category" and a field called "editing." I want to find all records that: Do not have a value in the "editing" field. (The "editing" field is empty/null) Do not have a value in the "category field OR the category field matches a variable $curCategory In a script, I am calling a "Perform find" to do this. Right now I am using an "Omit records" with "editing = *", and am trying to figure out how to code the rest of the logic. I know that one can use just "=" to find empty records, but for some reason, this is not finding all the records that have no values. With any other programming language, I could use something like: if(editing==null && category == null || category==$curCategory) How do I do this in Filemaker? Thanks.
May 29, 201312 yr Enter Find Mode Set Field(editing; "=") New Record/Request Set Field(Category; "=") New Record/Request Set Field(Category; $curCategory) Perform Find() If the = operator does not find a record, odds are that the search field isn't really empty. Manually go to a record which exhibits the problem, and use Tools->Data Viewer (since you have Advanced) to look at Length(yourSupposedEmptyField). If it is greater than 0, you have a space or non-printing character in the field.
May 29, 201312 yr Author Enter Find Mode Set Field(editing; "=") New Record/Request Set Field(Category; "=") New Record/Request Set Field(Category; $curCategory) Perform Find() If the = operator does not find a record, odds are that the search field isn't really empty. Manually go to a record which exhibits the problem, and use Tools->Data Viewer (since you have Advanced) to look at Length(yourSupposedEmptyField). If it is greater than 0, you have a space or non-printing character in the field. Thanks for the suggestions. I looked at the Length(Category) in the data viewer, and it is still showing 0 for the ones that it does not find. What else could be going wrong? EDIT: Hmm, I did manage to find a solution to the overall problem, though I am still not sure what was going on with it not finding empty fields.
Create an account or sign in to comment