Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FM8 Containers - Export Field Contents of Insert, Reference or Paste

Featured Replies

This may be convoluted but I'll "endeavour to persevere" in the problem description.

The OS is WinXP. An FM3/4/5/6 database converted to FM8 with 12,000 records. Fields are simple - a container field and an id.

Images are unfortunately stored via PASTE and REFERENCE. Do not appear to be any INSERTS.

GetAsText on the container field gives me this:

REFERENCE = image:Exploding_Moon.jpg

image:/S:/Exploding_Moon.jpg

PASTE = ?

We are trying to get all in the REFERENCE storage mode. So the plan is to EXPORT FIELD CONTENTS via script, so we locate the "?" records and have a script that loops through the found set setting a dynamic export file name and patching on ".jpg" as file extenstion.

The problem:

Some images export OK and some don't - the error is "Container Fields Cannot Be Exported". Sort of a dense error message as in my small sample 3 of the images in the containers do indeed export correctly while 2 don't and I get that message. Error capture is ON but that error is not trapable as GetLastError always = 0 and I always get that error message.

Ideas?

I need to sort out which images don't export out but the error trapping here seems iffy. And there are a lot of images.

Stephen

  • Author

More info on the problem.

It seems that the offending images are .pct format. I disabled the dynamic name auto-export and found that the exports flipped around between .jpg and .pct. So the questions really is how to detemine which is which prior to export - the only clue I get from GetAsText is "?". And I don't seem to be able to supress the Filemaker error or even capture its existence in a useful fashion. I suspose I can export both formats but I'd love to make the error dialog go far, far away!

would it be correct to say?

Your images are stored in the file.

You have a name for each image in a Text Field in your record.

You want to export the images to a folder, and use the Name you have in the Text Field.

You want to then use Store Reference of the images in your file.

If i have missed something, or this isn't what you meant, please correct it.

Lee

GetAsText only works for images that are Referenced, not for images that are imbedded in your container.

  • Author

Not actually true. Heres what I get from GetAstext with three methods.

Referenced =

size:526,792

image:FM Image Exports/pic.jpg

imagewin:/C:/Documents and Settings/nuffy/Desktop/FM Image Exports/pic.jpg

Inserted = pic.jpg

Pasted = ?

  • Author

Some images are stored as REFs, some are PASTED in and some are INSERTED. Many users, many years, no input controls until recently. So we have "a problem".

What I said [color:red]is true.

There is no File Path for an image that is Embedded in a container.

That is why you are getting a ?

Apology accepted.

Lee

  • Author

Let's try this.

Would it be correct to say?

Your images are stored in the file.

[color:red]some are some are not - that is the problem

You have a name for each image in a Text Field in your record.

[color:red]not at all true, just an id# - picture names are freeform

You want to export the images to a folder, and use the Name you have in the Text Field.

[color:red]No, I want to export those that are NOT referenced as the ref'd ones are fine as they are. I will create the export filenames dynamically.

You want to then use Store Reference of the images in your file.

[color:red]Yes - I want to put the exported images where the others are located then correctly reference them

The issue at hand is how to tell a PCT image from a JPG image when the GetAsText result for both is "?" And also how to get the error trap to work properly so I can export PCT when JPG export fails.

Thanks for your interest.

Stephen

  • Author

Lee..

Just to remain on target.

On Mac OS X with FM8Av2 using GetAsText on the container

INSERT = error.jpg

REFERENCE = size:150,150

image:../Curious George/family-flora.gif

imagemac:/Emerald Isle/Users/stephen/Pictures/Curious George/family-flora.gif

PASTE = ?

Stephen

The issue at hand is how to tell a PCT image from a JPG image when the GetAsText result for both is "?" And also how to get the error trap to work properly so I can export PCT when JPG export fails.

I don't think you can do this when exporting. Maybe with a Plugin like FMExport.

Check out this Plugin Here

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.