Jump to content

Cross-platform referenced images


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

Recommended Posts

I have a database developed in FM Advanced v8 Mac. Works great for all the clients on Mac. We have imported images into a container field for various records (only as references). Everyone has access to the same server (where the originals are stored/referenced from). However, the clients on Windows boxes cannot see any of the reference-imported images. How can I resolve this so everyone can see the images without importing them directly into the DB?

On a related note - I've worked out several fields to get the file name and path - but it's specific to whichever platform imported the file (we do some files and some images - all as references). So I get a "T:/..." path on Windows and the full absolute path from the Mac imported. I'm sure I'm missing an easier way to get a path that everyone can use - any suggestions? I've seen a lot of references to using Variables, but have never done it. I have not been able to figure out a clean way to strip out the "imagemac: filename.... image:....." information to get a clean path.

EDIT (to clarify) - what I'd like to get by calculation or script is a clean path to the file from just after the HD name or drive letter (all users know what server the file is on). So if it comes in as T:/Backgrounds/images/clean/01.jpg - I would want the path to show /Backgrounds/images/clean. I can get the filename easily but haven't been able to parse the various flavors of filepaths to be consistent regardless of who imported the file or image.

Any help is appreciated.

Edited by Guest
Link to comment
Share on other sites

This is my attempt at this problem. The logic is this: When you Insert by reference you can get the path, with the GetAsText() function. But, as you say, it is specific to each platform. So I did as you said, I cleaned the path to its essentials, then added the last used drive name from the other platform,* if needed, to produce a calculation that will adjust itself for the current platform. It is the calculation which produces the image. It can be on the same layout, covering the "insertion" container field, or it can be on its own layout. The latter is probably faster. If both layouts are identical otherwise you can flip between them as needed, to Insert or view the image.

*You could also just type the drive name.

RemoteImage_MacPC.zip

Link to comment
Share on other sites

Wow - thanks. That was quick. I'll have to take some time to see what you're really doing there - lots of calculation types that I haven't dealt with a lot in the past.

Thanks again! Hopefully I'll figure out how it works.

Link to comment
Share on other sites

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