March 3, 200619 yr 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
March 3, 200619 yr 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!
March 3, 200619 yr 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
March 3, 200619 yr GetAsText only works for images that are Referenced, not for images that are imbedded in your container.
March 3, 200619 yr 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 = ?
March 3, 200619 yr 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".
March 3, 200619 yr 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
March 3, 200619 yr 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
March 4, 200619 yr 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
March 4, 200619 yr 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