Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4196 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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:

  1. Do not have a value in the "editing" field. (The "editing" field is empty/null)
  2. 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.

Posted

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.

Posted

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.

This topic is 4196 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.