• 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: filemaker applescript question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filemaker applescript question


  • Subject: Re: filemaker applescript question
  • From: Bare Foot Guru <email@hidden>
  • Date: Thu, 20 Oct 2005 11:36:59 +1300

On 10/20/05, email@hidden <email@hidden> wrote:

 
It did not work. But the following worked:
set data record 1 to {"a", "b"}

The problem with this is that the field names cannot be specified in
such a statement. Using a database with several fields, I find this a
poor way to program for a database with several fields.
 
 
Well, you either have to hardcode the FileMaker field names into an AppleScript, or have a layout which doesn't change in FileMaker.  Pick your poison ;-)
 
Generally for loading data into FileMaker I'll choose the latter, and set up a special layout for the purpose.  I normally include an instruction on the layout that an AppleScript is depending on the layout name and field order.
 
I choose this method because I've found loading multiple fields at a time is significantly faster than doing it field-by-field.  From your experience this is probably due to FM doing a 'commit' for each field, plus having to send multiple Apple Events.
 
You could also try using the field-by-field method but within a 'with transaction' statement.  Would be interested in your findings.
 
Another method is to have a flag field in the database which defines an automatically generated record--i.e.
 
autogen=1
 
which is the first field you populate from the AS.
 
In the database you then turn off the 'require value' option and instead define a validation calculation along the lines of:
 
not isempty(my field) or autogen
 
i.e. You bypass the validation for records loaded from the AS.
 
 _______________________________________________
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

References: 
 >Re: filemaker applescript question (From: email@hidden)

  • Prev by Date: Re: Reading files
  • Next by Date: Re: coercing text to time
  • Previous by thread: Re: filemaker applescript question
  • Next by thread: Re: filemaker applescript question
  • Index(es):
    • Date
    • Thread