Sv: whose statement in FMP 7
Sv: whose statement in FMP 7
- Subject: Sv: whose statement in FMP 7
- From: Richard Rönnbäck <email@hidden>
- Date: Mon, 20 Sep 2004 20:19:33 +0200
God knows I'm very far from being a filemaker expert, but I do something
similar and I have tested this roughly 50.000 times and so far it has never
failed
try
set myRecID to (ID of record 1 where (cellValue of cell
"FilePath") is theFileURL)
on error
set myNewRecord to create record
set myRecID to ID of myNewRecord
end try
I also think it would be slightly more efficient, since (at least for me,
the most likely condition is that the file is already registred and then I
can just compare the values)
04-09-20 19.29 Skrev Bill Briggs email@hidden följande:
> I've only done a few scripts for FileMaker Pro 7, but lasts week I
> also noted that the whose clause wasn't working as it used to. It
> showed up in a script I was just using for testing purposes, so I
> didn't pursue the matter. It appears to be a bug.
>
> - web
>
>
>
> At 10:45 AM -0500 9/20/04, Heidi McMath wrote:
>> I am in the process of converting an image database that I had in
>> FileMaker 6 to 7. I have always used an applescript to automate
>> importing folders of pictures into the database. Among other things
>> the Applescript tested that the image file was of the correct type
>> and was not already in the database. That way I could re-import the
>> same folder when new images had been added to it without getting
>> endless duplications in the database. The applescript tested for
>> the existence of the image in the database with a line something
>> like this:
>>
>> tell application "FileMaker Developer"
>> exists (every record of database "Photo DB" whose cell "cImageName"
>> is equal to "photo10")
>> end tell
>>
>> In FMP 6 this returns true if there is a record with "photo10" in
>> cell cImageName and false if there is not allowing me to test for
>> true or false and allow the importation of the image or not as
>> needed. In FMP 7 the script line returns true if the photo exists
>> in the file but sends back an AppleScript error saying FileMaker got
>> an error: event not handled, if there is no such record. I created
>> a work around capturing the error number in a try statement and
>> using that to trigger my import but I worry that since I am not sure
>> why the event is not handled that some other error will trigger an
>> import. Does anyone know why my statement is not returning false
>> when the record doesn't exist?
>>
>> I am running Mac OSX 10.3 and FileMaker Developer 7.
>>
>> Heidi McMath
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Applescript-users mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> edband.net
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden