RE: Create record in FileMaker
RE: Create record in FileMaker
- Subject: RE: Create record in FileMaker
- From: "Steve Suranie" <email@hidden>
- Date: Wed, 29 Sep 2004 09:03:34 -0400
- Thread-topic: Create record in FileMaker
oops. forgot to set the AppleScript text items - add this to the first two line of the subroutine:
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to ":"
and add this to the last line of your code:
set AppleScript's text item delimiters to oldDelims
> ----------
> From: applescript-users-bounces+ssuranie=email@hidden on behalf of Steve Suranie
> Sent: Wednesday, September 29, 2004 9:01 AM
> To: email@hidden
> Subject: RE: Create record in FileMaker
>
> This might help
>
> set thePath to path to desktop as alias
> set dbPath to (thePath as string) & "FaxRecordResponse.fp7" as alias
>
> tell application "Filemaker Developer"
> try
>
> openDB(dbPath)
>
> tell front document
> set thisRecord to create new record
> set cell "FIELD NAME GOES HERE" of thisRecord to "Texas"
> set cell "FIELD NAME GOES HERE" of thisRecord to "12548"
> set cell "FIELD NAME GOES HERE" of thisRecord to "abc"
> end tell
>
> on error errMsg
> display dialog "There was an error in Filemaker Developer" & return & return & errMsg
> end try
> end tell
>
> on openDB(dbPath)
> set dbName to last text item of (dbPath as string)
> set dbPath to dbPath as alias
> tell application "FileMaker Pro"
> set dbCount to count of every document
> if dbCount > 0 then
> repeat while name of front document ? dbName
> close front document
> end repeat
> else
> open dbPath
> end if
> end tell
> end openDB
>
>
> > ----------
> > From: applescript-users-bounces+ssuranie=email@hidden on behalf of Lawrence B. Camp
> > Sent: Tuesday, September 28, 2004 11:10 PM
> > To: email@hidden
> > Subject: Create record in FileMaker
> >
> > <<File: ATT586494.txt>>
> > I would appreciate some basic help with an AppleScript to create a record in a FileMaker database. The FM database will be running when the AppleScript runs. The FM file is: FaxRecordResponse.fp7.
> >
> > Here what I have now:
> >
> > tell application "FileMaker Developer"
> > open file "FaxRecordResponse.fp7"
> > create record with data {"Texas", "12548", "abc"}
> > end tell
> >
> > FileMaker returns the error that > "> FaxRecordResponse.fp7> "> could not be opened (not found).
> >
> > How do I tell FileMaker where to find the file? Currently it> '> s on the desktop. I> '> ve tried the script with the file open and the error is the same.
> >
> > Thanks for your help,
> >
> > --
> > Lawrence B. Camp
> > 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
>
>
>
_______________________________________________
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