Re: Problem with FMP 10.0v1 OS X 10.5.8
Re: Problem with FMP 10.0v1 OS X 10.5.8
- Subject: Re: Problem with FMP 10.0v1 OS X 10.5.8
- From: Bruce Robertson <email@hidden>
- Date: Tue, 24 Nov 2009 05:23:27 -0800
Targeting tables is easy and reliable and fast and often the preferred way to go. It is quite convenient that you do not need to reference layouts and you do not need fields to be on layouts.
However there are certain fundamental things you need to understand.
A table has no find mode or found set or sort order or current record. You do not run find commands and you do not go to records.
The table is the raw data in creation order. You must address records by properties such as their ID or value of a certain field.
tell application "FileMaker Pro Advanced"
ID of (every record of table "Contacts" whose cell "Country" = "Norway")
end tell
Mark, what are you trying to accomplish?
On Nov 24, 2009, at 4:48 AM, Simon Forster wrote:
>
> Good luck with your approach. I gave up targeting tables as I couldn't get it to work and instead targeted layouts:
>
> tell application "FileMaker Pro"
> tell document "Contacts DB"
> go to layout "<layout>"
> --Do stuff
> end
> end
>
> A bit messy as the layout swaps all over the place in my solution - but it works.
>
> HTH
>
> Simon
>
> On 24 Nov 2009, at 12:29, Mark Lawrence wrote:
>
>> Hi all,
>>
>> The following code always fails at the line set cell "email" to "something" with an object not found error. The field email is on the active layout so what am I doing wrong?
>>
>> tell application "FileMaker Pro"
>> tell database "Contacts DB"
>> tell table "Contacts DB"
>> try
>> delete every request
>> end try
>> set theFindRequest to create new request
>> tell theFindRequest
>> set cell "email" to "something"
>> find
>> if (count of records) is greater than 0 then
>> --do something
>> else
>> --- do the rest
>> end if
>> end tell
>> end tell
>> end tell
>> end tell
>>
>> Regards,
>>
>> Mark Lawrence
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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
_______________________________________________
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