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.

Exporting Container Fields

Featured Replies

Hi Squad,

Gold star for anyone that solves this one. A customer of mine has been saving files into a container field instead of linking them. This has made that database huge in size considering it only has 1200 records (its about 300 meg).

This is not a problem, except for the remote workers that use the DB. When they load it over a VPN connection, it takes at least 5 minutes to load. Normally this is due to large index files, but this is certainly related to the container field this time.

If I remove the container field from the DB, the file size drops to 2 meg, and loads almost instantly.

So my query is this, I need to create a script that takes the files out of the container field, saves it to a predefined location, and links it correctly instead.

im in FM6, and would consider myself highly skilled with it, but this ones got me.

Currently im looking at the task in a manual way and its not pleasant!

Doing a yahoo.co.uk search on 'exporting a container field' the top result seems to give a solution, but the link is dead, which is really frustrating!

CHeeeeeeeeeeeers

Dave.

... unfortunatley container export in anything below fm8 can only be done using a static file path which means any file you exported in a script would always over write the previous one.. this problem can be worked around in 8 using a variable not that this really helps you... anyway so as far as i can tell your stuck doing manual exports...

genx

Take a look [color:blue]EXPORTFM 2.0 - IMAGE MANIPULATION AND FILE MANAGEMENT PLUG-IN FOR FILEMAKER PRO the New Millennium Communications

Here

Well, 8 might help. He could download the demo, convert the file, export the field, as separate files, then re-import the images into 6 (we must be talking about images here, as 6 doesn't do "files"). Another alternative would be duplicate the file, remove everything except the container and a linking ID field, then remove the container from the original file, and show the image via a relationship. Or would that also be slow via VPN? Even if the container is not on the layout?

i thought the trial had some sort of limit as to the number of records that could be stored?

... on second thoughts... you could do it... using fun fun dos commands...

basically... just do the following...

1) create an extra calc field to be the file name, we will call it

[color:red]FileName... GetAsText(Container)...

i hope that function exists in fm 6... anyways...

2) create 1 global field (if you know how to enter a double quotation mark normally.. cause i dont... just fix the calc lower

[color:red]called gQ and in there enter a "

3) make your desired export location in windows... i have used [color:red]c:FILESTORE

4) now... hoping that we have send event in fm6 aswell... assuming we do... the script would go as follows

[color:blue]Loop

[color:red]Export Field Contents[Your Container Field; temp.exe]

(specify the file path to be filewin:/c:/FILESTORE/temp.exe)

[color:red]Pause [Duration (Seconds) ; 2]

.. feel free to reduce this pause to maybe 1 second if you have a quicker computer, otherwise filemaker may not have time to place the file before windows tries to rename it...

[color:red]Send Event

Choose calculation and in there put the following:

"cmd /c pushd " &

Table::gQ & "c:FILESTORE" & Table:gQ

& " & "

& "rename"

& " " &

Table::gQ & "temp.exe" & Table::gQ

& " " &

Table::gQ & Table::FileName & Table::gQ

The above calc when evaluated should give you:

cmd /c pushd "c:FILESTORE" & rename "temp.exe" "yourfilenamehere"

Also, the word Table just refers to which table your field is located in..

[color:red]Pause [Duration (Seconds) ; 2]

[color:red]Exit Loop If Get(RecordNo) = Get(FoundCount)

[color:red]Goto Record [Next]

[color:blue]End Loop

sorry if its confusing, its a long post... genx...

... hmmm, as for the linking... referencing perhaps an autoentered text filename field rather than the calc field i originally suggested... make sure you force the autoenter to evaluate before hand though...then just make a container field with auto enter filewin:/c:FILESTORE/filenamefield

.. i say make it a container field not a calc field because i know you will likely want to enter more files manually... YAY 400 posts ???

Edited by Guest

(specify the file path to be filewin:/c:/FILESTORE/temp.exe)

None of this will work in 6 of course. The functions are just not there. Except for Send Event which was Send Message at the time. Before posting you really should try this out in 6 if you're not sure it will work, otherwise you risk wasting someone's time if they they take your info at face value and expect it to work.

Out of curiosity (and so you can push your post count up)??? why on earth would you rename a graphic to an executable?

  • Author

Thanks for all your replies,

I have actually written a filemaker database that handles batch files in dos for me. I can create custom batch files and run them when needed. I use this for moving files around and handling files generated by document scanning systems that need linking to FM6.

Could someone clarify that I can (using a script) export a container field's file to a set location (c:filename) in FM6, If I can do that im laughing.

D

  • Author

Oh, and I allready use that ExportFM plugin with quicktime to produce screen shots within filemaker, ill go back and look at what other capabilities it has.

thanks

Dave

... lol just because i didnt know he was storing images... like i said i dont know anything about filemaker prior to 7 so i was sort of just making an assumption... sorry... as for the exe... i didnt know we were storing images vs files... i figured .exe is an extension as good as any and likely better than most... but yeh... wat can i say but for silly little me...

genx ???

Edited by Guest

  • Author

I never said it was storing images!

they are storing everything from pdf's to fax's

Dave

Hi Dave,

Oh, and I allready use that ExportFM plugin with quicktime to produce screen shots within filemaker, ill go back and look at what other capabilities it has.

Man I hate that when I do that. :P

Please let me know how (if) this worked for you.

TIA

Lee

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.