• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Filemaker 'whose' clause broken?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filemaker 'whose' clause broken?


  • Subject: Re: Filemaker 'whose' clause broken?
  • From: Gary Lists <email@hidden>
  • Date: Sun, 25 Jan 2004 01:32:44 -0500

Chap Harrison wrote [1/24/04 12:49 PM]:

> Gary Lists mentioned earlier that 'whose' clauses are broken in some
> versions of FMP 6.

I am fairly sure this was repaired in the 6.0v4 update, which most FM6 users
would be using.

> Is there a workaround for this?

For whatever reason, I either don't think that way or haven't needed to
filter that way, but I don't use many 'whose' clauses in my scripting.

Therefore, I don't know. (Don't use that method of selecting from a set?)

Whatever update fixed the issue was a maintenance update, so it would be
available as a patch/update, not as a new license. Go update if your version
needs it.

> And, is the following due to a broken 'whose'?

You use the singular, and 'whose' implies the possibility of plural, so I
would change 'record' to 'records'.

Another thing that I notice, which can often be tricky, is the nested
(..(...)) in the tell block.

Actually, the whole 'whose' thing doesn't make sense to me in your script at
all.

You would use 'whose' to get a bunch of records from a set of records.

You seem to want to find whether or not a unique ID number exists in a set.
That's not the same thing.

> tell application "FileMaker Pro"
> if (exists (record of database myTable whose cell myUniqueField is
> myMessageID)) then
> display dialog "Exists"
> else
> display dialog "Not exists."
> end if
> end tell

Ignoring syntax...

If you said 'records of database myTable whose cell myUniqueField is
myMessageID' then you would get back a list of records where the cell
value's matched the variable.

Then you say "exists", which applies to a thing...an item of some sort.

Don't you really want to do a find on some records, then see if the returned
set has anything in it?

Okay, so a 'whose' statement could do that too, but you wouldn't want
"exists" in that case. You would want the length of the list. The 'count'
of some things.

The 'whose' clause line is pretty broken, I think (I didn't try anything in
FM or a script editor, but I can't imagine that it does what I think you are
trying to do, despite the use of 'whose'.)
--
Gary
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Filemaker 'whose' clause broken? (From: Chap Harrison <email@hidden>)

  • Prev by Date: Re: styled text to record, ok. But record to styled text?
  • Next by Date: Re: Filemaker 'whose' clause broken?
  • Previous by thread: Filemaker 'whose' clause broken?
  • Next by thread: Re: Filemaker 'whose' clause broken?
  • Index(es):
    • Date
    • Thread