Insert File Options dialog box

This dialog box appears when you specify Dialog options in the script editing pane for the Insert File script step. Use this dialog box to create a custom Insert File dialog box. The custom Insert File dialog box appears when users choose a file to insert into a container field.

1. For Custom Dialog Title, type a name.

Or, click Specify to create a title from a calculation (for example, to localize the title).

The title appears in the custom Insert File options dialog box.

2. Add, edit, or delete filters for the file types available in the custom Insert File dialog box.

 

To

Do this

Create a filter

Click New. In the New Filter dialog box, type a filter name and filename extensions in the Name and Extensions fields, respectively. Or, click Arrow button next to the Name field, and choose a filter from the list. The name and corresponding filename extensions are entered in the Name and Extensions fields, respectively. You can change the name and remove or add filename extensions.

To create a filter from a calculation (for example, to localize the filter), choose Specify Calculation.

Edit a filter

Click Edit. In the Edit Filter dialog box, make your changes.

Remove a filter

Click Delete.

3. For Storage options, choose how you want the file stored.

Let user choose allows users to decide how to store the file when they are working in the custom Insert File dialog box. (The Store only a reference to the file option is available.)

Reference only allows storing a file by reference.

Insert only allows either embedding a file in the field, or storing the file externally in the location specified in the Manage Containers dialog box. It does not allow storing a file by reference. (See About container fields.)

4. For Display, choose how you want supported image files and video and audio files displayed in the field.

Icon with filename displays an icon in the field; the file is stored as an attachment. (To work with the file, you can export it.) Choose this option if you want files to be compressed, or to be able to include file extensions that are not supported by FileMaker Pro Advanced.

Content of file (when possible) displays the content whenever possible, so that users can see, play, or interact with the file in the field. Content is displayed in the field when FileMaker Pro Advanced recognizes the file type. Otherwise, an icon appears in the field. When you choose this option, the Let user choose compression option becomes unavailable.

5. For Compression, choose how you want the file compressed.

Note  Because FileMaker Pro Advanced assesses your compression setting when a file is inserted into the field, the result may not be what you expected. A file cannot be compressed if the Reference storage option is selected in the Insert File Options dialog box (or if Store only a reference to the file is selected in the custom Insert File dialog box), the file content (and not an icon) is displayed in the field, or the file is already compressed (for example, it’s an MP3 file).

Never compress keeps the file uncompressed, even when the file is displayed as an icon in the field.

Let user choose allows users to decide in the custom Insert File dialog box. (The Compress option is available.) The file will not be compressed if any conditions above exist.

Compress (when possible) compresses a file when it is inserted in the field if it can be compressed. The file will not be compressed if any conditions above exist.

For more information about how these options work together, see the example below.

Notes 

It is possible to select both Content of file (when possible) and Compress (when possible). For example, if a file with an unsupported extension is inserted into the field, the file is compressed and displayed as an icon.

To create a custom menu for the container field, see Defining custom menus.

Example

The following example shows a typical configuration in the Insert File Options dialog box. Using these settings, FileMaker Pro Advanced inserts files into the container field and displays file content. When a file’s content cannot be displayed, the file is compressed and displayed as an icon.

1. For Custom Dialog Title, type Insert Media.

FileMaker Pro Advanced adds double-quotation marks around the filter name.

2. Select the "All Files" filter, then click Edit. Click Arrow button, and choose Video. For Extensions, remove .mpg. Click OK.

3. In the Insert File Options dialog box, click New. For Name, type PDF Documents. For Extensions, type .pdf. Click OK.

4. In the Insert File Options dialog box, click New. Click Arrow button, and choose All Files. Click OK.

5. In the Insert File Options dialog box, for Storage options, choose Insert.

Insert is a good choice for multiuser databases, because it ensures that all files will be available for all users.

6. For Display, choose Content of file (when possible).

The Let user choose compression option becomes unavailable. This makes the Compression option in the custom Insert File dialog box unavailable.

7. For Compression, choose Compress (when possible).

8. Click OK.

With the above settings, when a file is inserted into the field and can’t be compressed because of the display setting, that setting changes to Icon with filename, making file compression possible. For example, if a JPEG file is inserted in the field, using the above settings, FileMaker Pro Advanced does not compress the file, and displays the content in the field. However, if an Excel file is inserted in the field, FileMaker Pro Advanced compresses the file and displays an icon in the field.

9. Save and then run the script.

In the custom Insert File dialog box, with the above settings, you can’t select Store only a reference to the file or Compress, but you can choose a filter (from Show).

Related topics 

About container fields

Specify Calculation dialog box