• 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: Deleting records from Filemaker (continued)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deleting records from Filemaker (continued)


  • Subject: Re: Deleting records from Filemaker (continued)
  • From: David Simerly <email@hidden>
  • Date: Fri, 21 Sep 2001 15:40:30 -0700
  • Url: http://www.digital-native.com

on 9/21/01 2:34 PM, Mike Tuller at <email@hidden> wrote:

> The problem with this way of doing it, if there isn't a record that equals
> something I have in the script, the script is stopped because the object is
> not found. I assume that you would create an if statement. What would be the
> correct syntax for this statement. Also, is this the best way to do this
> type of deleting? I have a lot of records that I want to delete, so if the
> is a more efficient way, let me know.

There's a couple ways to do it. I think using the if statement approach you
mention above would be the most difficult because you would first have to
show all the records that match the criteria, then check to see whether the
found set contains any records, and finally do the delete. I believe the
easier approach would be to nest the deletes in try/end try blocks which
would trap the "not found" error and let the script continue on its merry
way. Your script might look something like this:

tell application "FileMaker Pro"
activate
try
delete (every record whose (cell "Software" is "Apple Applet
Runner"))
end try
try
delete (every record whose (cell "Software" is "Keychain
Scripting"))
end try
......etc.

HTH.

DS
______________________________________
Digital Native

Your guide through the virtual jungle.
______________________________________

"Everyone is a genius at least once a year." -- Georg Christoph Lichtenberg,
scientist and philosopher (1742-1799)


  • Prev by Date: RE: What's the biggest barrier to wider AS adoption?
  • Next by Date: Re: Import a picture into FileMaker without osax
  • Previous by thread: Re: Deleting records from Filemaker (continued)
  • Next by thread: Mail.app and Selection
  • Index(es):
    • Date
    • Thread