Re: filemaker applescript question
Re: filemaker applescript question
- Subject: Re: filemaker applescript question
- From: email@hidden
- Date: Tue, 18 Oct 2005 21:58:16 -0400
I am sorry if I was not clear:
A database with field A, and field B
when I set the fields using AppleScript, everything is normal.
if I make field A validation option to be "Not Empty" , then I try to
set the Field A and Field B, one at a time, then things still work fine
But, As soon as I make field B option to be "Not Empty", then when I
try to set the fields, one at a time, I get the error "Error: set data
failed. Invalid data was supplied (error # -17005)". The error is being
generated by FileMaker.
Now, if I manually tried to set the fields, one at a time, from
FileMaker, then things work fine. The only conclusion I can come up
with is that FileMaker is validating all the fields, before these
fields are being set, when I use AppleScript to set a field. As soon as
one field is set, using AppleScript, the other fields are being
validated, even though there was no attempt to set these fields, or to
exit the record.
>Frankly, what you've written is so sketchy that I just don't know what
the
goal is.
I hope this is more clear. The goal is really very simple. Just to be
able to set the fields in a record in the database. It just happened,
that the fields validation is done in the database, as is typically the
case, as opposed to being done in AppleScript. The problem with
validating in AppleScript is that I use the database manually (without
AppleScript most of the time, and I do need it to validate the data in
that case. So I am really stuck. If I validate in FileMaker, I cannot
use AppleScript, and If I don't validate in FileMaker, then I cannot
use the database manually safely (with validation set).
You wrote:
"email@hidden" wrote:
(using FM 6 on OS X 1.39). Setting a field in a database is causing an
error, if two or more of the fields in the database require that they
be non-empty (such as : validated as non-empty). And, FM6 seems to be
validating all the cell fields of the record, as soon as any one field
is set using Applescript, even before there is an attempt to exit the
record.
There is no such thing as "record commit" in FM 6. When you exit a
cell,
you commit.
I tried "on transaction" etc, but it has not worked in this
case. Anyone aware of this behavior and a solution?
Frankly, what you've written is so sketchy that I just don't know what
the
goal is. You want to set a cell value via AS, but your field
definitions/validations are getting in the way? Change your field
validations, then, and do the validating elsewhere (or 'elsewhen').
You said:
Setting a field in a database is causing an
error, if two or more of the fields in the database require that they
be non-empty (such as : validated as non-empty)
What's the error? Where does the error originate (FM or AS)? What you
describe above is not "an error", it's "a feature"...field validation
happens when you exit the field.
There is no "two or more" rule regarding field validation, so I don't
know
what you mean by "if two or more fields..." Your specific case should
not
be generalized to a "rule". If you think you've found a bug in FM6,
well,
that's going to be just too bad: FM6 is EOL, FM6 users are SOL.
"John C. Welch" nailed it when he wrote:
Take the time on your question that you'd want taken on the answer, and
you'll be fine. ;-)
Excellent advice for everyone.
--
Gary
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
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