Re: FileMaker 9 finds
Re: FileMaker 9 finds
- Subject: Re: FileMaker 9 finds
- From: Bruce Robertson <email@hidden>
- Date: Tue, 11 Nov 2008 09:22:25 -0800
> At 2:45 PM -0800 11/10/08, Bruce Robertson wrote:
>>> tell application "FileMaker Pro"
>>> show (first record of table "BBEditLists" of database "MailingLists.fp7"
>>> whose
>>> cell "Serial No." is "561")
>>> end tell
>>>
>>> Where "Serial No." is a text cell.
>>>
>>> Joe
>>
>> That should not work and should not be expected to work.
>>
>> You cannot show a table.
>> A table is the underlying data table.
>> A table has no found set and no sort order and you cannot perform finds in a
>> table and it is always in creation order and users never actually see
>> tables.
>
> I don't understand. How is what I wrote different than the example provided by
> FileMaker. This is from the Apple Events Reference installed by FileMaker Pro
> 9.0
>
> tell application "FileMaker Pro"
> show (every record of table 1 ¬
> whose cell "Last Name" contains ¬
> "Swain") --find a group of records, note that the ¬
> --table specified should be the active layout ¬
> --use go to layout to switch to correct table
> show (every record of document 1 ¬
> whose cell "First Name" contains ¬
> "Joe") --find records within the found set
> show (every record of table 2 ¬
> whose cell "Zip Code" = "") --find records that are empty
> show (every record of table 2 ¬
> whose cell "First Name" "") --find records that are not empty
> end tell
>
> So, why should this not be expected to work?
>
> show (first record of table "BBEditLists" of database "MailingLists.fp7" whose
> cell "Serial No." is "561")
>
> Joe
I suggest you read more carefully.
Here is what the Apple Events Reference file says about:
SHOW
The Show event will work on the following objects: Window, Document,
Database, Record, Request, and Layout. The object must already be open or
available; so it may be necessary to open a window, document or database
before showing something within it.
TABLE
Since a Table object is a FileMaker Pro table considered only as a
collection of fields and records, choose Table instead of Window or Layout
when you want FileMaker Pro to ignore temporary states of the document, like
the found set, when evaluating your request.
Note also that they say further on that:
Table specified should be the active layout
Use go to layout to switch to correct table
Here they are mixing up table and layout terminology, which is not at all
helpful.
It can lead to problems because a table does not necessarily have a layout
associated with it and a table may be associated with many layouts. If you
mean layout (that is you want to SHOW something) then you should really
specify layout.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden