Re: Filemaker: whose cell is... doesn't search exact
Re: Filemaker: whose cell is... doesn't search exact
- Subject: Re: Filemaker: whose cell is... doesn't search exact
- From: cris <email@hidden>
- Date: Wed, 11 Jul 2001 19:10:15 +0200
on 11.07.2001 9:59 Uhr, Simon Forster at email@hidden wrote:
>
on 11/7/01 2:11 am, cris at email@hidden wrote:
>
>
> With the FM "whose cell x is y" statement i try do determine a record, but
>
> the problem is that FM returns records which are not having the exact
>
> requested value. For example:
>
>
>
> <whose cell "bla" is "hello cris"> returns records with the cell value
>
> "hello cris"
>
> "cris hello"
>
> "there cris hello"
>
>
Pretty much as you'd expect given FMP's method of indexing records.
>
>
> I tried using the special search symbol for an exact search "==" with no
>
> success. I guess that works only in the "find" command of FM.
>
>
Good to know.
>
>
> I have to mention that i can't use the "find" command of FM since this needs
>
> more than one statement (clearing and defining request) and the script is a
>
> CGI, so another incoming call could override a current find which would lead
>
> to false results or errors.
>
>
Use FileMaker's "transaction" command. This will prevent FMP from "breaking"
>
a chain of events contained within the begin transaction... end transaction
>
block. Be careful though. You can leave FMP in a locked state if it doesn't
>
receive the end transaction.
I use now this workaround: checking the cell value of the found records in a
repeat loop, not too bad in my case since it will be extremely seldom that
more than one record is found. But strangely it works when i do the
comparison in the repeat loop:
cell "bla" of record id RecID is "hello cris"
Then it returns false as expected when the cell value is _any_ different. It
only fails when "whose" is used. Strange.
Another reader pointed me to using "equal".
But all the following request lead again to the same set of 3 found records:
tell application "FileMaker Pro"
tell database "untitled"
show (records whose cell "test" is equal to "hello cris")
show (records whose cell "test" begins with "hello cris")
show (records whose cell "test" begins with "hello cris" and cell
"test" ends with "hello cris")
end tell
end tell
No matter which parameter i use, it makes no difference. I start to think it
is a bug in FM (i'm using 5.0v3).
Thanks & Greetings
cris :-)
--
English is my second language, please write slowly!
www.cooc.de