Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Does any one know of a way to determine if an image reference stored in a Container field is valid? And.. I'd like to do this without a plugin if possible.

More specifically.. I have a table of images where the image container is a calculated field and its formula is something like:

myContainer = myPathName

and myPathName contains a text value like: "image:Images/ITM_000038.jpg"

So the pictures are not imported. I just put them into a folder called 'Images' in the same folder as the database and FM loads them automatically when needed.

The problem is, I would like to write a utiltiy script to step through the database records and flag those who have missing files out on the hard drive. I'm wondering if this can be done without a plugin.

Thanks. John

Posted

If you're 100% sure that the file extension is compatible with the webviewer (safari on mac, IE on Windows), then you can display this file in a webviewer and see if the "content" is empty or not.

If you do it with a not compatible file type, the file will be "downloaded".

Posted

I was wondering about this too. It would be great to be able to detect a 404 in a Web Viewer in a way other than by sight.

If you have control over when and how the files are created or written to the directory, you can script adding info to a field (I use a field called fileExists) at the same time and check for that.

Otherwise, a plug-in like Troi URL could fetch that info (or even the HTML source) for you.

Posted

I didn't mean "by sight" but using GetLayoutObjectAttribute ( "WebViewer" ; "content" )

Posted

fabriceN.. thanks for the suggestion, very nice idea.

But.. It doesn't seem to work for images. The 'GetLayoutObjectAttribute' function returns "" for records with valid paths and those with invalid paths. The only other value I have gotten from this function is '' which occurs for just one of my images. Oddly.. this image is a valid jpeg that does display in the web viewer as well as my container field. So I'm not sure what's up there.

This is very frustrating. If Filemaker containers are going to store file references by default, wouldn't the first thing that every developer would want to do is figure out if the linked files are actually there or not? Seems very strange that one cannot do this without resorting to a plugin.

John

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