Re: Filemaker 8.5 and current record syntax
Re: Filemaker 8.5 and current record syntax
- Subject: Re: Filemaker 8.5 and current record syntax
- From: Dan Doughtie <email@hidden>
- Date: Tue, 01 Aug 2006 11:42:22 -0400
- Thread-topic: Filemaker 8.5 and current record syntax
Title: Re: Filemaker 8.5 and current record syntax
I tried using the “tell current record” inside FMP and also within Script Debugger 3. Same results. I even tried using FMP 8.5’s new Object Naming inspector to name the field and that didn’t help.
I even tried “repetition 1 of cell “myCell””
I’m flumoxed.
Dan
--
Dan Doughtie
Business Analyst
Morris Technology Services
706-823-3464
Nothing contained in this e-mail is intended to be an offer to commit Morris Communications Company to any purchase, sale, contract or other course of action.
From: "Gary (Lists)" <email@hidden>
Date: Mon, 31 Jul 2006 20:46:15 -0400
To: AppleScript Users <email@hidden>
Conversation: Filemaker 8.5 and current record syntax
Subject: Re: Filemaker 8.5 and current record syntax
"Dan Doughtie" wrote:
> Referring to a "current record" was never a problem for me before. But now in
> 8.5 I can't find any anything that will reference it."
[and]
> Is this broken or is there a different "current record" method?
Dan, I've also experienced this in 8.0. Although I did not take time to
figure the 'why', I did find an easy enough solution which worked for me.
I wrapped my record-related get/set statements in a "tell current record"
block.
So, here's a real piece of AS from an FM script:
[...]
tell current record
set noticeTitle to cell "Notification Display Title"
set noticeMessage to cell "Notification Display Message"
set noticeProcessOwner to cell "GrowlProcessRegistry::Process Name"
set noticeName to cell "Notification Name"
set noticeIcon to cell "Notification Display Icon"
end tell
[...]
This works for me both from Smile [1] and from inside FileMaker [2].
> Using my old syntax I've tried
>
> Tell application "FileMaker Pro"
> tell table "MyTable" of document "MyDatabase"
> set MyScores to cell "bones" of record 3 --this works
> set MyScores to cell "bones" of first record-- this works
> set MyScores to cell "bones" of last record-- this works
>
> set MyScores to cell "bones" of current record-- This generates Object Not
> Found Errors.
> end tell
> end tell
>
> Also tried tell table "MyTable" of database "MyDatabase" in the first line
> with no luck.
[1] Inside a Smile AppleScript terminal window, one can 'target' an
application, so that one can perform some single line of AS code as if were
inside a "tell application ..." block.
[2] Inside FM means that I was executing AS code in a Perform AppleScript
script step, which is also implicitly targeted to FM in a "tell
application..." block.
I offer these clarifications, because my solution to the same "Object not
found" error with "...of current record" may not translate to your script's
context. (Is FM front-most? Are you inside a FM script running AS, or in an
external AS? And so on and so forth...)
HTH.
--
Gary
_______________________________________________
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:
This email sent to email@hidden