Emma,
Your needs have already surpassed the free script editor. What you're
doing is hard if you don't know how; - so cheat. Buy a bigger
hammer... If you had Script Debugger, you'd open the filemaker
dictionary, click Explorer, toggle a few triangles open and get to this:
every record of layout 1 of document 1
But I dove right into databases and tables, and, after fiddling a
minute, remembered that tables don't have found sets and current
records, they only have all records; but layouts do. So I backed up
the little graphic tree I've got here, clicked my way down thru
documents into layouts to get the above line.
drag that text into an editor window, highlight it, and it evaluates
instantly in a pop-up style tool tip revealing:
{
{
"geoff",
"acc",
"abcc
another bcc
andagin",
"thesubject",
"and a bit of body"
},
{
"eric",
"another cc",
"",
"sub",
"bod"
},
{
"",
"",
"",
"",
""
}
}
(that list of lists is the data of 3 records with 5 fields; the last
record is empty)
So I go and make one the found set and hover my script again and get:
{
"geoff",
"acc",
"abcc
another bcc
andagin",
"thesubject",
"and a bit of body"
}
Ah, a single list of 5 values now. Tweaking my script (the first time
I've typed any code for this) for my particular database gets me here:
tell application "FileMaker Pro Advanced"
current record of layout "cells" of document "cells"
end tell
>returns every value in an ordered list of only the found set on
that layout
All that takes a minute or two with Script Debugger. It's hard to
explain complex tools like this but if you saw it, you'd see what I
mean.
geoff
On May 14, 2007, at 5:58 AM, Emma Glaisher wrote:
I've found a workaround, where Filemaker copies the page number of the
current record into a global field, and then the Applescript only
performs
on the records where the page number matches the global field.
But I'd still like to know what's wrong with 'current field'. Or even
'record 1 of found set'....