Filename and Path

Filename and Path

am 11.11.2007 22:35:37 von Iced Tea

I have FMP 8.5 Advanced and I have a container field that I use to display
pictures. Is there a way to display the path and the filename?

Thanks,
Carl

Re: Filename and Path

am 12.11.2007 21:45:54 von Chris Brown

Iced Tea wrote:
> I have FMP 8.5 Advanced and I have a container field that I use to display
> pictures. Is there a way to display the path and the filename?
>
> Thanks,
> Carl
>
>


you can parse this at the import picture stage

Re: Filename and Path

am 12.11.2007 23:52:39 von ursus.kirk

"Chris Brown" schreef in bericht
news:fhae25$65j$1@aioe.org...
> Iced Tea wrote:
>> I have FMP 8.5 Advanced and I have a container field that I use to
>> display pictures. Is there a way to display the path and the filename?
>>
>> Thanks,
>> Carl
>
>
> you can parse this at the import picture stage

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., but you could use a variable)

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