Re: FileMaker Scripting Query
Re: FileMaker Scripting Query
- Subject: Re: FileMaker Scripting Query
- From: Steve Thompson <email@hidden>
- Date: Fri, 22 Mar 2002 12:34:38 +0000
Simon,
Thanks for the response. Yes, I am sure the first version works. I have
already tried your version and it produces an error "Object not found" which
goes if I use the format:
tell filemaker
tell database xxxx
do stuff
end tell
end tell
I'm using FileMaker 5.0v3 and Script Debugger if that makes any difference?
Steve
on 22/3/02 12:14 pm, Simon Forster at email@hidden wrote:
>
>
On Friday, March 22, 2002, at 11:31 am, Steve Thompson wrote:
>
>
> I have a database that contains 6990 records. If I run this script
>
>
>
> tell application "FileMaker Pro"
>
> tell database "Item_.fp5"
>
> activate
>
> try
>
> show (every record whose cell "rangecode" is "WSS1")
>
>
>
> end try
>
> set tmp to the count of records
>
> display dialog tmp
>
> end tell
>
> end tell
>
>
>
> I get a dialog box that says "47" which is correct. When I click OK and
>
> go
>
> to FileMaker, the database shows the found set. Simple and perfect.
>
>
>
> However, if I change the script slightly:
>
>
>
> tell application "FileMaker Pro"
>
> tell database "Item_.fp5"
>
> activate
>
> try
>
> show (every record whose cell "rangecode" is "WSS1" and cell
>
> "easycode" is "B4D1")
>
>
>
> end try
>
> set tmp to the count of records
>
> display dialog tmp
>
> end tell
>
> end tell
>
>
>
> I should get a dialog box that says "1" but I don't. It finds all the
>
> records and displays a dialog box that says "6990".
>
>
Are you sure that the first script worked fine?
>
>
You need to check out the difference between "database" and "document"
>
within FileMaker Pro scripting. I use syntax along the lines of:
>
>
tell application "FileMaker Pro"
>
show (every record of database "Item_.fp5" whose cell "rangecode" is
>
"WSS1" and cell "easycode" is "B4D1")
>
set tmp to count of records of document "Item_.fp5"
>
end tell
>
>
Watch the line wraps and HTH
>
>
Simon Forster
>
________________________________________________
>
LDML Ltd, 4/5 Hazlitt Mews, London, W14 0JZ, UK
>
<tel int="+44 20 7602 9370" uk="020 7602 9370">
>
<fax int="+44 20 7371 6662" uk="020 7371 6662">
>
<mailto:email@hidden>
>
________________________________________________
_______________________________________________
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.