RE: scripting copy from one filemaker database to another
RE: scripting copy from one filemaker database to another
- Subject: RE: scripting copy from one filemaker database to another
- From: "Goodman, Steve" <email@hidden>
- Date: Tue, 23 Jan 2001 16:07:54 -0600
>
The problem is that the create new record does not seem to
>
work. Usually it
>
creates the new record in the original database from where
>
the script is
>
called. Basically applescript can't seem to differentiate
>
between the 2
>
databases. I would assume the tell Database "dataX.fp3"
>
statements would
>
take care of this.
I'm not the FM expert but I think that you need to activate the database and
bring it to the front.
Tell application "Filemaker Pro"
Tell Database "data1.fp3"
activate
Tell Current Record
set variable1 to cell "field1"
set variable2 to cell "field2"
End Tell
End Tell
Tell Database "Data2.fp3"
activate
create new record
go to last record
Tell Current Record
set cell "field1" to variable1
set cell "field2" to variable2
End Tell
End Tell
End Tell
Steve Goodman
Vertis - THE LTC GROUP
......."Duct tape is like the force, it has a light side and a dark side and
it holds the universe together."------Unknown
>
-----Original Message-----
>
From: Lorne Golden [mailto:email@hidden]
>
Sent: Tuesday, January 23, 2001 3:36 PM
>
To: email@hidden
>
Subject: scripting copy from one filemaker database to another
>
>
>
Hi All,
>
>
I have been away from applescript for a while but I am trying to do
>
something simple and having a problem. Perhaps I am missing something
>
obvious but it seems like a bug.
>
>
My applescript is designed to copy from one filemaker
>
database to another
>
filemaker database. It is very simple I set variables to the data in
>
database 1 then go to database 2 and set the fields to the varialbes.
>
>
General format is
>
>
Tell application "Filemaker Pro"
>
Tell Database "data1.fp3"
>
Tell Current Record
>
set variable1 to cell "field1"
>
set variable2 to cell "field2"
>
End Tell
>
End Tell
>
>
Tell Database "Data2.fp3"
>
create new record
>
go to last record
>
Tell Current Record
>
set cell "field1" to variable1
>
set cell "field2" to variable2
>
End Tell
>
End Tell
>
End Tell
>
Any help or advise would be greatly
>
appreciated. I am
>
using Mac OS 9.04 and Filemaker 4.1v3.
>
>
Thanks in Advance.
>
>
Lorne
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users