Database Reference
In-Depth Information
The entire calculation consists of a reference to a field of that name in the Graphics table.
The calculation does the grunt work of copying the high-resolution image into the low-resol-
ution field in each record.
Calculations with References
If a container field holds a reference to a picture, movie, sound, or file, instead of the object
itself (see the box on
Managed Container Storage
)
, then you can do even more. When you
treat such a field as
text
, FileMaker gives you some information about the referenced file.
If you have a field called Product Shot that holds a reference to a photograph file, then you
can use this calculation:
GetAsText ( Product Shot )
The results you get depends on how the image is referenced. If you turned on “Store only a
reference to the file” when you added it, the result will look something like this:
size:480,360
image:banjo.jpg
imagemac:/Macintosh HD/Users/sgripman/Desktop/banjo.jpg
If you're using FileMaker Pro 13's secure container management feature, the result will be
more akin to the following:
remote:space_ghost.jpg
size:396,284
JPEG:Secure/31/1C/4B1A4079/3DB25A4E/7685EA68/9B07
FileMaker tells you the size (width and height in pixels) and location of the file (if this wer-
en't a picture, then you wouldn't see the “size:” line).
You can use this calculation to help you keep track of a set of images that the whole com-
pany needs to use. The calculation isn't dynamic, however, so the path serves as a reference
of where the file
should
be, not where it really is. Company policy about putting things back
where you found them has to reinforce your good data practices.