Re: Creating server based image catalogs with Filemaker?
- From: "Ursus" <ursus.kirk@xxxxxxxxxx>
- Date: Thu, 8 Jun 2006 11:54:59 +0200
Pics with random filenames that need to be imported are a pain in the
(BLEEP). However random sometime or other you will need to bring some
structure. I send incoming pics through a batchrename (also a filemaker
solution), which renames them sequentialy. When a file gets thrown away I
also throw away the fmp record (or rather when I delete the record the file
gets wiped as well) Next time I run the import script any gaps will be
filled. This is slow, but has worked for me very, very well. And I can add
anything from 1 to unlimited amounts of pics this way. Building it is not
something for the novice.
I did not send you a script, but some calculation examples. So it looks like
you are indeed just starting. Perhaps my attempt was a bit too much to chew?
I'm not very good at Scriptmaker, I use win XP, but have tried some basic
scriptmaking on osx. What I gather you are trying to do could easily be
solved with a combination of filemaker and one of the many plug-ins found on
the web. FileToolbox and TROI File-plugin spring to mind. But generaly I
would be hesitant using any clipboard function. You can never rely on the
actiual contents. Most people think they can, but beleave me, it is not so.
within Scriptmaker Filemaker fields are referred to as cells, you can
allways get and set the data on an active layout where the field you need is
visible. I don't have an example around, but it should be easy enough to
find one.
Good luck
--
Keep well,
Ursus
"Bonge Boo!" <bingbong@xxxxxxxxxxx> schreef in bericht
news:C0AD8E32.22C30%bingbong@xxxxxxxxxxxxxx
On 7/6/06 21:06, in article 448731af$0$60596$dbd4b001@xxxxxxxxxxxxxxx,
"Ursus" <ursus.kirk@xxxxxxxxxx> wrote:
You should probably look into calculated container fields. These are also
far more flexible then just importing. Whenever a name changes you will
loose the pic anyway. Create a calculation with a result of container.
From
an old thread I copied the followiong info.
Thanks for that. I'll take a look through your reply when I get a moment
later today. One real quick question. Looking through your script with my
extremely rudimentary Scriptmaker knowledge, it appears that the image
container is calculated on the basis of the value in another field, the
idPhoto field.
However this database is created with filenames with pretty random names,
paths, etc. Currently it holds over 15,000 images, and more are added
using
the Import->Folder command. I can't see how the calculation method would
work for this sort of unstructured environment. Am I missing something?
My crappy solution is found down the bottom.... Works on the Mac,
obviously
not on a PC, although I guess if I do the string manipulation in
Scriptmaker
it could.
FileMaker 7 offers the "Insert Picture/QuickTime/File" script commands to
place data into a container field. However, these script steps are
limited
in that they must explicitly identify the particular file to be imported.
(You cannot express a path using a calculated value.) If you want to
dynamically control the contents of a container field, you can instead
use
either the "Set Field" script step, or auto-enter options. Both will
accept
a calculated value as a parameter. The calculation must result in a
string
representing the file path in the same format used by the "Insert
Picture/QuickTime/File" script commands. (Just an in any calculation,
literals must be enclosed in quotes.) Supported formats for the pathname
include the following:
file:directoryName/fileName
filemac:/volumeName/directoryName/fileName
filewin:/driveletter:/directoryName/fileName
filewin://computerName/shareName/directoryName/fileName
image:directoryName/fileName
imagemac:/volumeName/directoryName/fileName
imagewin:/driveletter:/directoryName/fileName
imagewin://computerName/shareName/directoryName/fileName
movie:directoryName/fileName
moviemac:/volumeName/directoryName/fileName
moviewin:/driveletter:/directoryName/fileName
moviewin://computerName/shareName/directoryName/fileName
For example:
Set Field [Personnel::idPhoto; "imagewin:/D:/Photos/" &
Personnel::employeeID & ".jpg"] will set idPhoto to show "23456.jpg" from
the D:/Photos directory, when employeeID is 23456. When a container field
is
set using this method, the files are always stored "by reference" only.
They
are not copied into the FileMaker database file. If the original file is
moved or renamed, FileMaker will display "the file cannot be found" in
the
container field. If the original file is modified, the new contents will
be
shown when it is updated. Calculations may also reference container
fields.
for example, if you import a picture "rose.gif" into field, "myImage"
then
the calculation checkPic (calculation, text result) = TestDB::myImage
will
return:
- "rose.gif" if you imported the picture from disk and stored it within
FileMaker
- "?" if you placed it into the field via the clipboard
- "size: 630,240
image:../../My Documents/My Pictures/rose.gif
imagewin:/D:/My Documents/My Pictures/rose.gif" if you imported it from
disk
and stored only a reference to the file.
Using both techniques together, you could handle a situation where a
directory of images had to be moved or converted to a different format,
without re-importing them. For example:
Substitute ( Catalog::ProductImage; "/images/"; "/archived/") If all the
images referenced in your file had been moved to the "archived"
directory.
--
Keep well,
Ursus
"Bonge Boo!" <bingbong@xxxxxxxxxxx> schreef in bericht
news:C0ACE606.22BAF%bingbong@xxxxxxxxxxxxxx
Filemaker 7.03 on Tiger 10.4.6
Don't know if anyone out there is doing this sort of thing with
Filemaker
or
not.
I want to have a multi-user Filemaker database, which is essentially an
image catalog, which shows the locations of the files on the computer, a
thumbnail and then has various other fields.
Adding images via the Import->Folder enables me to get all the images
in,
which also contain a reference to the file location. I can then link a
Open
URL script to a button to enable people to open the image itself from
within
Filemaker. Super.
However, when I place the images on a server volume, it all falls apart.
The
file path might appear correct, but the image will not open. I assumed
it
was just because it was on another "disk", so I tried moving the images
to
another partition on the local machine; on one drive it works, on
another
it
didn't. So not sure if we also have problems with special characters and
the
like.
Hum. Anyone out there done this sort of thing?
I'm thinking I might need to link the value of the image path field to
an
Applescript to get it to open, but wiser brains may know otherwise?
Suggested reading gladly received.
--Return Clipboard Contents to Data Flow
set filemakerpath to the clipboard as text
--manipulate the string to add the required prefix and strip the file://
set truepath to "/Volumes/" & lstripString(filemakerpath, "file://")
-- open the file. Remember you have to '' the string to escape spaces,
etc.
do shell script "open '" & truepath & "'"
on lstripString(theText, trimString)
set x to count trimString
try
repeat while theText begins with the trimString
set theText to characters (x + 1) thru -1 of theText as string
end repeat
on error
return "" -- The text contains nothing but the trim characters
end try
return theText
end lstripString
.
- References:
- Creating server based image catalogs with Filemaker?
- From: Bonge Boo!
- Re: Creating server based image catalogs with Filemaker?
- From: Ursus
- Re: Creating server based image catalogs with Filemaker?
- From: Bonge Boo!
- Creating server based image catalogs with Filemaker?
- Prev by Date: Re: IWP - multiple home pages
- Next by Date: Re: Version question
- Previous by thread: Re: Creating server based image catalogs with Filemaker?
- Next by thread: Re: Creating server based image catalogs with Filemaker?
- Index(es):