Re: Moving Data from FileMaker to Cumulus
Re: Moving Data from FileMaker to Cumulus
- Subject: Re: Moving Data from FileMaker to Cumulus
- From: Ken Latman <email@hidden>
- Date: Wed, 20 Jun 2001 08:56:16 -0400
Dear Jed,
Thanks for writing back with your answer. I greatly appriecate it. I guess
I'm still a little new to AppleScript for when I look at what you gave me I
am still scratching my head.
I was sort of on the same path with my own efforts. I first determined that
I should count how many records I have in Filemaker.
tell application "FileMaker Pro"
count records
result
set FileCount to result
end tell
I next determine that this number should be the number of times the script
should repeat itself. From here it became cloudy.
I want to first match one field in my FileMaker database with another in my
Cumulus. This being the Image name which I have in both.
If this matches then I wanted it to copy data from two fields in my
Filemaker Database to corresponding fields in my Cumulus Database. I believe
your script just moves the entire records from Filemaker to Cumulus with no
comparison.
Am I on the right track with this?
tell application "FileMaker Pro"
if cell data of field "Image File Name" is equal to content ,
of field "Record Name" of application "Cumulus 5 Client" then
copy field "Code Number" of application "FileMaker Pro" to ,
field "Meyer Number" of application "Cumulus 5 Client"
end if
end tell
So far this doesn't work and I can't quite figure out what I'm doing wrong.
I have Danny Goodman's Applescript book but I am missing (surprisingly)
about 30 pages which just happen to be about scripting Filemaker
(manufacturer's fault).
Your help is much appriecated.
Thanks again,
Ken Latman
>
Hello again, Ken,
>
>
There are multiple ways to do this but let me describe the basics:
>
>
In order to catalog images in Cumulus, you must have a file specification
>
(path). You can't just transfer the contents of a container field in FMP to
>
Cumulus (unless you turn the container contents into a file first or you
>
create a dummy image for cataloging then replace the thumbnail with your
>
container image after the record has been created in Cumulus).
>
>
So, let's say you have a file path stored in an FMP field called "filePath"
>
and two other fields, "notes" and "creatorName", with text in them. To
>
export to Cumulus, your script would be something like this:
>
>
---begin script
>
tell application "FileMaker Pro"
>
tell database "dbName"
>
repeat with i from 1 to (count records of database "dbName")
>
set zData to record i
>
--in my case, zData = {"note txt","creator name","file path"}
>
my CatalogIt(zData)
>
end repeat
>
end tell
>
end tell
>
>
to CatalogIt(fieldData)
>
set filePath to ((item 3 of fieldData) as string) as alias
>
tell application "Cumulus S5.0"
>
set newRec to catalog assets filePath to front collection
>
set field "notes" of newRec to ((item 1 of fieldData) as string)
>
--here, you could set another field to the value of creatorName
>
end tell
>
end CatalogIt
>
----end script
>
>
Basically, getting the data of a given record in FMP returns a list of all
>
field data. You then pass that data to Cumulus, turning the file path into
>
an alias and then cataloging the file to create a new record. The record id
>
is captured in the newRec variable and is used for setting the other fields.
>
>
I hope this helps...let me know if you have other questions!
>
Jed
>
>
My favorite person, Ken Latman, wrote this:
>
>
> Dear Jed,
>
>
>
> There is a script to send Cumulus data out to FileMaker (which I believe is
>
> a script) but not the other way around. We bought Cumulus with our PowerFile
>
> Jukebox so the disk I have is labeled PowerFile Cumulus 5, but is a full
>
> functioning Cumulus (the spash screen just has Powerfile junk on it)
>
> The whole thing was bought through Canto.
>
> This disk does not contain any extra scripts.
>
> If you have any ideas your help would be much appriecated.
>
>
>
> Ken
>
>
>
>> Hi Ken,
>
>>
>
>> Isn't there a FileMaker to Cumulus AppleScript included with the Cumulus
>
>> application? (There used to be...perhaps they've stopped including this...if
>
>> you haven't already, check the "Cumulus and AppleScript" pdf document in the
>
>> Cum application folder.)
>
>>
>
>> HTH,
>
>> Jed