Jump to content

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

Recommended Posts

Posted

filemaker 5.5 (windows and mac os x)

i have an image database which has a field for pathname...

the images are saved on a shared volume...

since I imported the images in windows...the pathnames are saved as

computernameshareddocspicfolderpic1.jpg

then...if the user wants to access the file...i have created a go to url script...

however, if the user is on a mac...they cannot go to url cause the path is different..is there a way to change the pathname to the mac format automatically? i have 2,000 + images...

i have to change the format to

file:///localhost/volume/shareddocs/picfolder/pic1.jpg

and i'm not quite sure how to script it for all existing records and future records.

thanks

Posted

hello mallikai,

I suggest that you create an unstored calculating text field with a formula which runs along the lines of:

Case(Abs(Status(CurrentPlatform)) > 1, YourURLfield, "file:///localhost/volume/" & Substitute(Middle(YourURLfield, 16, Length(YourURLfield) - 15), "", "/"))[/case]

Then use the calculation field in place of the URL field in your 'Open URL script steps etc.

That way, although the URL syntax is windows based, the URLs will be translated whenever the file is being run on a MacOS client.

If you want to be able to store URLs in either format, that could be done too, but you'd need a slightly more complex formula that tests which format the URL is stored in and translates in the opposite direction (ie Mac to Win) when the stored formula is in Mac format. The basic approach, however would be as outlined above.

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