June 11, 200223 yr I'm using the following script and it's doing the strangest things: tell application "FileMaker Pro" activate tell database "lead_routing.FP5" activate set gEmailScript to cell "gEmailScript" of record 1 as styled text create record at layout "Entry View" with data {"Dan", "", "", theTitle, Address1, Address2, theCity, theState, theCountry, PostalCode, Phone, "",
June 11, 200223 yr Author I just figured it out by myself. The order of fields is based on the tab order of the current layout. Once I created a layout w/just the fields I wanted to import, everything went fine!
June 17, 200223 yr Author Ok, I thought I had figured it out, but I hadn't. I just went to filemaker.com and this article fixed it.
June 18, 200223 yr A somewhat more robust method (ie, its not dependent on that layout never changing, and allows you to update the script easily later) is to use steps like this: set MyRecord to create new Record set cell Field1 of MyRecord to ..... set cell Field2 of MyRecord to ... etc. It will save you a lot of work later, and it, at any rate, makes your code more portable if you ever have to tweak out a different field set-ing applescript
Create an account or sign in to comment