Jump to content

Auto Create a record with known data


This topic is 8509 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a scrit that collects certian data, I call them media_encode, media_title, media_URL etc. I have a database that coresponds with this data. what is the applescript phrase to create the record

tell application "FileMaker Pro"

open file "macintosh HD:StoryDatabase"

create new record {cell1:"test"}

end tell

I can't get this to work thoughts?

Link to comment
Share on other sites

The syntax for creating a new record with data is:

code:


tell application "FileMaker Pro"

create new record with data {"field 1 data", "field 2 data", "field 3 data"}

end tell


The order of the data has to be the same as the creation order of the fields, and all the fields that you are setting have to appear on the current layout. You can of course replace the literal strings with variables containing the actual data. There are also other ways to use applescript to set field values, but this one is probably the simplest to follow. This script also assumes that you have already opened the file and it is the currently frontmost filemaker window. You may want to add steps to ensure this is the case.

[This message has been edited by BobWeaver (edited January 29, 2001).]

Link to comment
Share on other sites

This topic is 8509 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.