Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5928 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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?

Posted

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.

  • 2 weeks later...
Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.