August 21, 200817 yr I have a flat database with, amongst others, a container field called 'Image' and another field called 'Main Photo' which contains the full path to that image (e.g. D:My Documents............014.jpg). I have made a very simple script (attached) which I thought would read 'Main Photo' and insert the image into 'Image' All I get is an error saying that the file cannot be found. I can insert the file 'manually' so I can't see what's wrong. Thanks for any help Photographic_Collection_Script.pdf
August 21, 200817 yr If your path is: D:My Documents............014.jpg as written I believe that is your problem. Try: D:/My Documents/.../.../.../.../014.jpg hth
August 21, 200817 yr Neither of those are "absolute" file paths, they are "relative" file paths,* which are not very useful in this case (unless the image files are always within/near the FileMaker file's folder, both on a local drive). Create a calculation, result Text; GetAsText ( container field ). Put it on a layout. It is 3 (long) lines tall. Insert an image file into the container field, [x] As reference only. Look at the last line. That is the absolute file path. Use that instead. *Actually I don't think they are correct either, but that doesn't matter at this point.
August 21, 200817 yr Hi Fenton: I tried that and it gives me just the file name not the whole path. The whole path is: C:Documents and SettingsAlMy DocumentsMy DocumentsFilemaker CMcbcInvoicesInvoice.pdf All I get is Invoices.pdf and it is on the top line. I created a Calc field with the calculation GetAsText(Container Field Name) as suggested. This of course would work fine if I am always using the same folder and I'm only changing the filename. Set variable($Path;imagewin:/C:/Documents and Settings/Al/My Documents/My Documents/Filemaker CM/cbc/Invoices/ImagePathField Am I doing something wrong?
August 21, 200817 yr If you just get the name, you are likely forgetting to check the [x] As reference only option (lower left) in the Insert dialog. It's very easy to do.
August 22, 200817 yr Yep, that did it. Thanks. It's the little things that make life soooo much easier. Al
September 1, 200817 yr Author Many thanks - worked a treat. I used to be on 5.5 and used the Troi file plugin and the way I had it worked fine. Obviously the FM9 way is more fussy! Thanks again
Create an account or sign in to comment