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.

Container field - Export File Script

Featured Replies

Hi everyone. Thanks in advance for your help. I've practically given up at this seemingly simple script.

I'm sharing a database over the FMNetwork using a Mac running OS 10.5 and hosting to other Macs running the same OS.

I'm attempting to write a script that exports a referenced file (a pdf file located on the host computer) from a container field to the "Get(TemporaryPath) directory then immediately open. So far I have:

Set Variable [$TempFilePath; Value: Get (TemporaryPath) & GetAsText (container field]

Export Field Contents [container field; "$TempFilePath"; Automatically open]

When I click on the button that runs this script on the [color:blue]Host computer, it actually removes the referenced file from it's original location and I get a dialogue box that says it cant find the original file. When I click on the same button on a [color:blue]client computer, I get the same dialogue box but

the referenced file remains in its original location.

When I store the file within the database solution (rather than as a reference) it works fine though. Since I'll be sharing hundreds of these PDF files, I'd rather reference them rather than store them within the solution due to file size.

Any suggestions would be greatly appreciated.

You don't export referenced files, just embedded files.

To share referenced files among multiple workstations, they must be stored on a shared volume, and each user must have the same path to the volume.

  • Author

Thank you for your response. That helps to know that now. Once I established the path, how would I go about using that in a script that the clients could use it to open the referenced file? "Export Field" had the option built right in it to open file immediately. I don't see how I could open a referenced PDF file using the "Open File" script step, and If I use the "Open URL" script step, it opens my browser rather than Acrobat.

Why do I have a feeling I'm missing something so obvious here.

Thanks in advance.

Double-click on the container field or write a script that simply Go to Field (Container).

  • Author

The double click works on the host computer but not for any of the client computers (over FMNET). I've even turned on File Sharing on the host computer. I even mounted the host computer's volume to the client's computer (through File Sharing) just to see if that would work, and nothing. Am I missing a step to direct each client to the reference folder of PDF files on the host?

Thanks again.

Edit --> The error message I'm getting when I double click the container field on a client computer is:

The file "Test.pdf" could not be found and is required to complete this operation"

Edited by Guest

The path must work for everyone. Try inserting an image from a client. Examine the contents of the container using GetasText (Container). What is the path? How does it differ from the other containers that were inserted from the host?

  • Author

When I attach a file (referenced) from a client computer it has a completely different path because it's still stored on the client computer. If I now double click on that field from the host computer, I get the same error message.

The files cannot be stored on the client computer. They must be on a shared volume. Do you have a fileserver?

  • Author

I do have a "file server" but it's more of a workstation that everyone backs their work up to at the end of the day. I guess I need to do more research on how to set up a true file server.

You could go back to embedding the files in containers. If you separate the table that has the images into its own file, that may help a bit.

  • Author

That may be the solution for me. Thank you so much for your help and walking me through this.

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.