• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie question


  • Subject: Re: Newbie question
  • From: Ben Waldie <email@hidden>
  • Date: Thu, 13 Mar 2003 15:33:38 -0500

Blaine,

On Thursday, March 13, 2003, at 02:41 PM, Blaine Wilson wrote:

I'm new to AppleScript, so please bear with me if this is a total newbie
question. Most of my scripting so far has been borrowing from existing
scripts and slogging through a few of my own lines of script. It has been a
slow process so far, but I'm in the learning stages.

You've come to the right place.

I'm trying to manipulate "found" FileMaker Pro 5.5 records. The book I'm
referencing, which is fairly old, says "document" refers to found records
only and "database" refers to all records in the database. (AppleScript for
the Internet by Ethan Wilde, p 201.)

This doesn't seem to be the case. I end up with the same result whether I
use "document" or "database."

The reason this is happening is because your line...

set cell "Unsubscribe" of record 1 of document "Customers Copy.fp5" to "X"

is inside of a "tell database" block. So, for some reason, FileMaker is ignoring the "of document" you are specifying. Try moving the line outside of the "tell database" block, and it should work. I.e.

tell application "FileMaker Pro"
activate
tell database "Customers Copy.FP5"
--create a find request using data from the variable
create new request
set cell "Email" of request 1 of database 1 to theAddress
find
end tell
set cell "Unsubscribe" of record 1 of document "Customers Copy.fp5" to "X"
end tell

On another note, in case you don't know, you can find records in FileMaker without actually creating a find request. For example...

tell application "FileMaker Pro"
tell database "Customers Copy.FP5"
show (every record whose cell "Email" contains theAddress)
end tell
end tell

Hope this helps.

Thanks,

- Ben

Benjamin S. Waldie
Automated Workflows
=============================================
Consulting - <http://www.automatedworkflows.com>
AppleScript Info - <http://www.applescriptguru.com>
AppleScript Training - <http://www.applescripttraining.com>
=============================================
_______________________________________________
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.

References: 
 >Newbie question (From: Blaine Wilson <email@hidden>)

  • Prev by Date: Re: reading a file >32Kb
  • Next by Date: Re: Mounting dave shares
  • Previous by thread: Newbie question
  • Next by thread: Getting the (check) mark character of a menu item through "System Events"
  • Index(es):
    • Date
    • Thread