Editing file, picture & hyperlink data

About media data

Files, images, and hyperlinks can be stored in records as File attributes (sometimes referred to as "embedded media"), Picture attributes, and Hyperlink attributes.

Note that while the maximum file size recommendations for embedded media (File and Picture attributes) hold for tabular data, you should be aware that adding lots of files in tabular data can quickly make datasheets impractical to load and/or edit. This is because editing tabular data requires fetching all the rows (and their media data) from the database and saving back again.

To edit file, picture, or hyperlink data

  1. Ensure that the system is in Edit Mode.
  2. On the datasheet of interest, click Edit this data on the left of the file attribute name. (In a version-controlled table, this option is only available on unreleased records.)
  3. For files:
    1. Click Choose file to browse and locate the file.
    2. Select Allow file contents to be searched to allow the file contents to be searched when performing searches in MI:Viewer. (This applies only to file types supported by indexing services, such as Microsoft Word or PDF files.)

      Clear the check box if you want to prevent the file contents, for example, a spreadsheet of test results, from being searched. Note that the name and description of file attributes are always searchable.

    3. Description: optionally enter the text you wish to see displayed as the file identifier on the datasheet. See Specifying a description below for an example.
    4. Target: choose where in the application window you want the file to be displayed when it is loaded. See Target below for examples of the different options.
  4. For hyperlinks:
    1. Description: optionally enter the text you wish to see as the hyperlink identifier on the datasheet. See Specifying a description below.
    2. Address: enter the link URL. If you are using the hyperlink to reference a remote file on your MI:Server, see Linking to large files using hyperlinks below to see the specific format required for the URL.
    3. Target: choose where in the application window you want the file to be displayed when it is loaded. See Target below for examples of the different options.
  5. For pictures, click Choose file to browse and locate the image file.
  6. (Optional) You may be able to add metadata about the data value, such as statistical information or notes about the source of the data.
  7. (Optional) You can add information about any changes that you make on the Notes tab.
  8. Click Save to save all your changes.

Specifying a description

If a description is entered in the Description field, then this appears on the datasheet instead of the filename (for files) or address (for hyperlinks). If no description is provided, a file is identified on the datasheet by its filename, and a hyperlink by its address.

When no Description is specified, the filename is used as the link on the datasheet:

 

If a Description is specified, this string is used for the link on the datasheet:

Both the filename and the description will be included in searches; the file contents will only be searched if the Allow file contents to be searched option is selected.

Hyperlink description example

Specifying where in the window a file or hyperlink will be opened (Target)

If the file is of a type that can be opened within the MI:Viewer application (PDF, text), Target specifies exactly where the file contents should be displayed.

Linking to large files using hyperlinks

Large files can be stored outside the database using a hyperlink attribute to reference the external ('remote') file. Clicking on the hyperlink will cause the file to be downloaded to your machine.

To use hyperlinks in this way, your system needs some special configuration:

To link to an external file

  1. Ensure that MI:Viewer configuration described above has been done.
  2. Click Edit this data on the left of the hyperlink attribute name.
  3. Description: enter the text you wish to see displayed as the hyperlink text, in this example “Database backup”.
  4. Address: enter the following string exactly as shown:

     /mi/RemoteFile/Get?attributeId={attributeId}&recordid={recordid}&databaseKey={databaseKey}

  5. Target: the value of this field is not used, since the file will be downloaded.
  6. Key: enter the relative path to the file from the remote files root folder.

    In this example, the external file in this Large File attribute is specified in a metadata attribute called Key, and defined as Group1\BigFile1.bak (the file is located in subfolder Group1 under the root remote files folder):