Re: FileMaker 'create new record @'
Re: FileMaker 'create new record @'
- Subject: Re: FileMaker 'create new record @'
- From: Xandra Lee <email@hidden>
- Date: Mon, 30 Oct 2000 14:30:57 -0500
>
I am getting so frustrated I am about to put my fist through the
>
monitor. I have a script that wasn't working, then it started
>
working,
>
...and now it's not working again. It all boils down to this
>
statement:
>
create new record at layout "aeCreateMasterList" of database
>
"Upgrader.fp5" with data {"1", doImport, doSerialUpdate, doReplace,
>
fileName}
>
The layout "aeCreateMasterList" contains the five fields that are
>
used in this statement. For some reason it is setting the data based
>
on layout 0.not according to the fields that are actually on this layout.
I'm not sure why it worked then didn't work (most likely you rearranged
the fields at some point).
For starters, The others are correct, you must have exactly the desired
number of fields present on the layout, but that doesn't seem to be your
problem. (Calc and date fields on the layout will Always screw you up)
Using your syntax (which DOES work regardless of which layout is showing
at least in FMPv4),
FMP will enter the data according to the field placement on the
layout.(which is often not obvious).
So your best is to query FileMaker...
1. Run this script from your Script Editor:
Tell application "Filemaker Pro"
name of fields of "aeCreateMasterList" of database "Upgrader.fp5"
-->{"field3", "field1", "field2", etc...}
end tell
--This method always returns the order in which Filemaker will enter or
return field data
2. Then change the order of data entry in your Applescript.
Hope this helps.
Xandra
Alixandra Leigh
AceDesign
email@hidden
------------------------------------------
Furniture:
><
http://home.rochester.rr.com/alexleighs/furniture/furniture.htm>
Renderings:
><
http://home.rochester.rr.com/alexleighs/interiors/interiors.htm>