Part of the Samples Website. 8/16/97.

samples.basicStuff.fileMakerLoop

«Shows how to pull information out of a FileMaker database
«it creates a text file on your system disk
«containing the state names and capitals of all the states
«in the State Capitals database we include with Frontier
local (textfile = file.getSystemDisk () + "States Text")
file.new (textfile) «create the file
file.setType (textfile, 'TEXT') «it's a text file
file.setCreator (textfile, 'ttxt') «it can be opened by TeachText
file.open (textfile)
local (dbpath = Frontier.pathstring + "Extras:FileMaker & Frontier:State Capitals")
app.startWithDocument ("FileMaker", dbpath)
with FileMaker, objectModel
show (record [all]) «select all records
for i = 1 to count (layout [1], record)
stateName = get (record [i].cell [1])
stateCapital = get (record [i].cell [2])
file.writeLine (textfile, stateCapital + ", " + stateName)
file.close (textfile)
launch.anything (textfile)


This page was last built on Sat, Aug 16, 1997 at 6:35:26 PM. You can download the current set of sample scripts from our FTP site. Dave