Filemaker problem
Filemaker problem
- Subject: Filemaker problem
- From: "Pitcher, George" <email@hidden>
- Date: Thu, 7 Dec 2000 08:39:36 -0000
Hi all,
I've precised (pronounced 'prayseed') the script I'm having a problem with
(shown below).
It has two routines which involved either a single folder or multiple
folders in a drive.
I need to get a page printed from Filemaker with a list of the items in the
folder which is also the data in a field in FMP. So, I grab the find
criteria from the list of folders and ask Filemaker to show all records
whose cell "deliverybatch" = criteria. basically Filemaker doesn't go
through the search operation. If the appropriate records are already found
in the two databases, the script performs excellently but then falls over
when trying to do the second folder (if one exists) because FMP isn't
searching.
The Filemaker Solution consists of 9 database files and I'm loath to call
'database 1' etc just in case the wrong one is at the front. I prefer to use
explicit names.
I have tried the syntax out on a diferent FMP database and it found the
records just fine.
I'm using Filemaker Pro 5 and the files are served from NT but this
operation is being carried out on a mac client.
Any suggestions. This list has been great at pointing out other errors in my
3 weeks of scripting with Applescript. I just wish I'd discovered AS sooner.
Now, has anyone out there replaced a Frontier-scripted website (inc FMP
interaction) with an Applescripted one?
===========
tell application "Finder"
set pathname to "H:"
copy name of every folder of disk pathname to FolderList
set foldercount to count of every folder of disk pathname
repeat with i from 1 to foldercount
tell application "Finder"
tell application "FileMaker Pro"
activate
set foldername to item i of FolderList
show (every record of layout "HEI_main" of document
"HeronCustomers.fp5")
show (every record of document ,
"HeronCustomers.fp5" whose cell "DeliveryBatch" is
foldername)
set deliverynum to get (cell "DeliveryNum" of current record
of layout ,
"HEI_main" of database "HeronCustomers.fp5")
set deliveryname to get (cell "DeliveryBatch" of current
record of layout ,
"HEI_main" of database "HeronCustomers.fp5")
set ftpFolder to get (cell "HEI_Folder" of current record of
layout ,
"HEI_main" of database "HeronCustomers.fp5")
show (every record of database "HeronFlowmanager.fp5")
show (every record of database ,
"HeronFlowmanager.fp5" whose cell "deliverybatch" is
foldername)
set filename to (deliveryname & ".pdf")
tell application "Finder"
set pathname1 to "HERON03:System
Folder:Preferences:PrintToPDF Output File Name"
make file at folder pathname1 with properties
{name:filename}
end tell
do script FileMaker script "AS_Schedule" of document
"HeronFlowmanager.fp5"
set cell "deliverynum" of current record of layout ,
"HEI_main" of database "HeronCustomers.fp5" to
(deliverynum + 1)
end tell
====
Do other stuff
====
end repeat
end if
end tell
=====
Regards
George Pitcher
Technical Manager
HERON Project
Merchiston Learning Centre
Napier University
10 Colinton Road
Edinburgh EH10 5DT
Tel: 0131-455 2435
Fax: 0131-455 2249
www.heron.ac.uk