Jump to content

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

Recommended Posts

If you create a calculation simply referencing the container field (text result) and look at the result, you'll notice that there is more information in there than you need (On Mac but not Windows). And, the path information is the same as what you need for the Open URL script step to open a file. Here is a calculation that converts the image path to a file path:

Let(

ImagePath = RightValues(container; 1);

Substitute(

Left(ImagePath; Length(ImagePath) - 1);

["imagemac:/"; "file://"];

["imagewin:/"; "file://"]

)

)

Link to comment
Share on other sites

Hi,

I tried using this calc., but something is going wrong. My current file path is

file://Mac3/zz_ImageDatabase/00002/7323827.jpg

I tried using the Open URL and inserted the calc. that is posted, but I keep getting invalid URL. Do I need 2 sep. fields-1 for the file path and 1 for the image path?

Link to comment
Share on other sites

Well, it took me a while to surf through your files and locate the correct fields and scripts. It's always nice to give directions in your file when someone offers to assist you.

Anyhow, I have attached a working version of the files. It doesn't appear the solution every contained the calculation referenced in this thread.

ImageDatabase.zip

Link to comment
Share on other sites

Well, I imported a folder of about 5 images that are located on a local server. Everything imported perfectly. However, when I click on the "Open Image" I get Question marks "?" in both the image and file path fields. Here is a file path for one of the images.

file://Mac3/zz_ImageDatabase/00002/7657759.jpg

I am confused on whats going on. When a picture is imported from the server and stored only as a reference then a complete file path is needed. Should an alias of the picture be created so that when it is moved the picture will be able to relink itself? Is there another way to open an image other than "Open URL"?

Link to comment
Share on other sites

The calculation replaces the image path with a file path using the Substitute function. This requires removing "imagemac:/" or "imagewin:/" and replacing or substituting it with "file://". Before this can be done, additional information (only on the Macintosh) must be removed. You can see this information if you just look at the path provided when a calculation simply referencing the container field is displayed in text format. However, you won't see anything additional unless you view it on a Macintosh.

Link to comment
Share on other sites

  • 2 months later...

I don't have a file server available on which to test this. Maybe someone else here can figure out what's wrong with the calculation.

Hi, I have used the above calculation for opening files (thank you John!) but have the same problem as Joe: when the file is stored on the server it doesn't work. Does anyone have a solution for this? I'm using an applescript for Mac clients instead of "open url", but not sure how to make it work for Windows clients. I would really appreciate any ideas! Thank you in advance.

Link to comment
Share on other sites

I don't have a network either, but have you tried what Filemaker Help says is the supported path format for the "absolute path to a target file or folder on a Windows volume shared using Windows file sharing":

filewin://computerName/shareName/directoryName/fileName

Link to comment
Share on other sites

This topic is 6472 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.