Re: Scripting an AppleWorks database
Re: Scripting an AppleWorks database
- Subject: Re: Scripting an AppleWorks database
- From: Nigel Smith <email@hidden>
- Date: Fri, 02 May 2003 17:22:35 +0100
On 2/5/03 6:52, "Jeffrey Mattox" <email@hidden> wrote:
>
I can use the "unavailable" keyword for a text field, but not for a
>
number field. If any of the records has an empty value in the number
>
field, I get an error.
"Whose" appears to be broken when looking for "unavailable" in number
fields.
So it is back to the slow old ways -- iterating through the records,
building a list, then hiding those records that are in the list:
tell application "AppleWorks 6"
set idList to {}
tell document 1
repeat with x from 1 to count of records
set tmp to value of field "test3" of record x
if tmp is unavailable or tmp < 3 then
set end of idList to id of record x
end if
end repeat
repeat with eachId in idList
hide record (contents of eachId)
end repeat
end tell
end tell
The above will hide all records with a value less than 3 in field "test3",
including those with no value at all.
HTH,
Nigel
_______________________________________________
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.