since your pictures are all in the same folder and has the Code as the name, it is easy to do.
Create a new field in your table, that must be a calculation, return type container.
let's say your pictures are located in C:\pictures\
your calculation will be :
"C:\pictures\" & table::Code & ".jpg"
put this field on your layout and it will display the image.
oups I forgot something,
in the calculation you must put imagewin: or imagemac: in front of the path.
Example if you are on windows :
"imagewin:c:\pictures\" & table::code & ".jpg"
Hi Mystic, thanks a lot for your help, I did what you suggested but I still get an error message "the specified field is not found" when I add the calculation field:
any idea of what I am doing wrong?
Thanks in advance
"imagewin:/F:/Users/Sandra/Pictures/Fotos/Variedades Clavel/Redimensionadas/" & MAESTRA::CODIGO & ".jpg"
To explain why Nick's suggestion should work, the backslash \ functions as an "escape" character in FileMaker text expressions. You can, for example, use it like this \" to put get FileMaker to treat a double quote as a character instead of the marker for the end of some literal text in an expression. You can use \ in your file path, but you have to double them everywhere you use them, so the / becomes an easier option to use.
Should also work.
OK, thanks to both of you for your answers, here is what I get now:
Using PhilModJunk's suggestion I am able to configure the field with the calculation formula, now I go to the layout and try to display the field but I get the following message: File not found:F:\Users\Sandra\Pictures\Fotos\Variedades Clavel\Redimensionadas\D 308 M.jpg
using Nick's suggestion: I am able to configure the field with the calculation formula, now I go to the layout and try to display the field but I get the following message:File not found:D 308 M.jpg
In both cases I have already checked that the file D 308 M.jpg is present on the folder related so the file DOES exist; and this happens with every record and every file, the system is not able to display any picture.
Any suggestions will be highly appreciated, thanks a lot for your help.
Let's try this experiment to see if we can narrow down what detail is at issue here.
Take a container field in a blank record--this can be a container field in your current file or you can simply create a new file and use it for this test.
Use Insert Picture to insert the above image file into the container with the "by reference" option selected.
Define a calculation field that returns text and put the name of your container field as the sole term in the caluclation field's expression. (In other words, if the Container field is named ContainerField, just put ContainerField in the specify Calculation dialog box.)
Put this new field on the layout next to your container field and size it so that it is several lines of text tall. In browse mode, you should see several lines of text here and one line of text should be the FileMaker format file path to your image. Compare it letter by letter to the expression you've been using to see if you can determine what detail is different.
Thanks PhilModJunk, I did what you suggested and here is what I get now:
image:../../../Pictures/Fotos/Variedades Clavel/Redimensionadas/D 308 M.jpg
imagewin:/F:/Users/Sandra/Pictures/Fotos/Variedades Clavel/Redimensionadas/D 308 M.jpg
so I went inmediately and added the slash before the drive letter F and VOILA!!! it worked perfectly!! Thank you really really so much, you saved me lots of work. I hope this is useful for someone else as well.
Thanks again, great forum!
My question is similar to Sandra's, which I cannot figure out yet: I would like to extend this question with viewing files from a webserver. If I can view an image in my webbrowser at address http://www.yyy.com/images/image.jpg How can I make this image viewable in FMP? Thanks in advance!