FileMaker question
FileMaker question
- Subject: FileMaker question
- From: Simon Forster <email@hidden>
- Date: Fri, 13 Feb 2004 09:56:58 +0000
From: email@hidden
Subject: FileMaker question
Date: 13 February 2004 05:47:32 GMT
To: email@hidden
I am trying to make a database for tracking specific files. It works
ok but
the routine for adding new files does not work as I was hoping for, so
if
anyone can help me I would appreciate it very much.
The example below will work if all records are shown by FileMaker, but
if I
have conducted at search so that only subset is shown, it seems that
the
script looks for records only among the search result, not among all
records, which is what I need.
So how do I either (preferably) get it to look among all records, or
clear
the previous search result (less than perfect, but would work)
It might be that I'm not entirely sure I understand the distinction
between
"database" and "document" but I have tried both at it doesn't seem to
matter
which one I use.
You need to be clear about the difference between database and
document. IIRC, targeting the database, you're ignoring the current
state (of the document). Targeting the document, you're taking into
account the state.
So, "tell database x to return count of records" will return the number
of records in the entire database. "tell document x to return count of
records" will return the count of records in the current found set.
tell application "FileMaker Pro"
set myReg to database "Textregister.fp5"
tell myReg
try
set myRecID to (ID of record 1 where (cellValue of cell
"Svkvdg") is theFilePath)
on error
set myNewRecord to create record
set myRecID to ID of myNewRecord
end try
end tell
end tell
I'm not too sure what you're trying to achieve here but can I suggest
you take a look at the value of "myNewRecord" in light of the above?
HTH
Simon Forster
____________________________________________
LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK
Tel: +44 (0)70 9230 5244 Fax: +44 (0)70 9230 5247
____________________________________________
_______________________________________________
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.