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

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

Recommended Posts

Posted

Hey guys, I am looking at my script for a while now and I can't get it to work. I believe there is nothing wrong with it, but FM shows one record instead of none (in my case, since I have inserted values in all records).

I did a found on a table and my result needs to be broken down to when a particular field is empty. I want those fields as a result.

The script:

Go to record[first]

Loop

If [not IsEmpty (field1) or field2 = "blabla"]

Omit Record

End if

Go to record[next; exit after last]

End loop

If I read the above script it tells me this:

1. Go to the first record of the found set.

2. check if field2 equals "blabla", if true...omit record, if false check if field1 is not empty, if true also omit record.

3. go to next record, do the check again, untill the last record

So for short: Only show the records where field1 is empty and field2 doesn't equals "blabla"

In my found set (before the above script) I got records like this:

field1, field2

1, "blablabla"

2, "blablabla"

If I am correct, Filemaker has to omit both records, but it doesn't!! It shows the last record. Why is this?

Thanx for any help.

Greetings, Auditiaan

Posted

Can't see it myself, try this method though, see if it makes a difference:

Go to record[first]

Loop

If [isEmpty (field1) and field2 <> "blabla"]

Omit Record

End if

Go to record[next; exit after last]

End loop

Show Omitted

Can't try it myself while i'm here i'm afraid.

Another possiblility is that after omitting a field it is moving to a record other than the next one, you can test this by putting the 'pause/resume script' script step in and watching what it does. always a good way to follow a script through.

Another alternative is to perform the find manually yourself using find mode and typing in what you want to find, then create a script which restores the find request.

Hope one of these works for you.

This topic is 7320 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.