Creating FileMaker records using a Layout
Creating FileMaker records using a Layout
- Subject: Creating FileMaker records using a Layout
- From: Joan Sánchez Sabé - interempresas <email@hidden>
- Date: Wed, 2 Oct 2002 19:22:08 +0200
Hi everyone,
I have one database with a wide collection of fields. Three of them cannot
be left empty when you create a new record. For this reason, I have one
layout called "minimal" which lists these three fields (and only these).
I have been using the follwing script with FileMaker for some time:
tell application "FileMaker Pro"
tell database db
create new record at end of layout "minimal" with data { 1, 2, 3 }
end tell
end tell
This code would make a new record and populate the three required fields
with value 1, 2 and 3.
This has been working without any problem for some time, and the script has
created a few thousand records.
After making some changes to the database (basically, adding some
calculation and summary fields), this script stopped working. Since then on,
I always get the "Set data failed, wrong data supplied" -10075 error code.
The definition of any of the fields involved in the Script did not change.
You can make a new record "by hand" with those values without any complaint
or warning from FileMaker.
I found some people on the net (
http://www.concisedevelopment.com/;
http://home.knuut.de/paul/scripts/mailsmith/Export_to_FMPro3.html) using
this technique as well.
After some (quite a lot) of hours of struggle, I decided to change the field
definitions of the database (actually a copy of it) so that no value would
be required nor checked for validation. After that, I could see that the
script was actually creating a record, and populating it with data. However,
the fields being filled are not the ones present at layout "minimal", but
the three first fields in creation order (equivalent to layout 0). I have
tried to understand the FileMaker documentation and found out some
contradictions with regard to this (so, I ignored it).
I have tried the same code on other databases and found out that the
behaviour of FileMaker is (at least for me) unpredictable. Some times it
will take notice of the 'of layout "minimal"' part of the sentence,
sometimes will just fill the fields in creation order.
So, apparently the problem is related to FileMaker and not to AppleScript.
Has anyone experienced something like that?
Could you find out how to make AppleScript+FileMaker do what you really want
it to?
I am using FileMaker Pro 5.0Ev3 (E means Spanish), Mac OS E1-9.2.2,
AppleScript E1-1.7.
I have tried to download AppleScript 1.8.3 but it won't let me install on a
non-English Mac OS, and I could not find a Spanish version for it.
Thanx to all.
Joan Sanchez Sabe
_______________________________________________
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.