Simon Hall Posted August 21, 2008 Posted August 21, 2008 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
aldipalo Posted August 21, 2008 Posted August 21, 2008 If your path is: D:My Documents............014.jpg as written I believe that is your problem. Try: D:/My Documents/.../.../.../.../014.jpg hth
Fenton Posted August 21, 2008 Posted August 21, 2008 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.
aldipalo Posted August 21, 2008 Posted August 21, 2008 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?
Fenton Posted August 21, 2008 Posted August 21, 2008 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.
aldipalo Posted August 22, 2008 Posted August 22, 2008 Yep, that did it. Thanks. It's the little things that make life soooo much easier. Al
Simon Hall Posted September 1, 2008 Author Posted September 1, 2008 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
Recommended Posts
This topic is 5928 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now