dropimagesfromfinder
dropimagesfromfinder
OPTIONS

The dropimagesfromfinder statement processes images that have been dropped on a form from the Finder. The images may be added to new records in the database or put in the current record.

Parameters

This statement has one parameter:

options – This parameter can contain a list of options that modify the operation of the statement. See the description below for more information.

Description

This statement processes images that have been dropped on a form from the Finder. It is designed to be used in a procedure triggered by a Drag Receiver object. (Note: If you are converting a database from Panorama 6, you’ll need to add a Drag Receiver object that invokes this statement to your form.)

The first parameter specifies a list of options that modify the operation of the statement. Each option is in the format optionname=“value” (the quotes may be omitted if there is no special characters or punctuation in the value). Here is a typical example with two options, field and skipduplicates.

    dropimagesfromfinder |||field="ImageName" skipduplicates=yes|||

Each of the possible options is described below.

#### Field

The field option specifies what field the image paths and names should be placed into. If this option is omitted the image path & name will be placed in the current field, however, it is usually a good idea to explicitly specify the field.

#### Type

The type option specifies a type of image that will be allowed. You may choose from jpeg, tiff, png, pict, bmp, pdf, gif, photoshop, mov, mpeg, wav, aiff, aac, mp3, and sd2. (Note that some of these are movie types; you can drag and drop movies in addition to still images.) You can explicitly specify multiple types by using multiple `type=` options, for example:

    type=jpeg type=tiff type=png

You can also specify “composite” types: image for all image types, movie for all movie types, or sound for all sound types, or all for all media types (including image, movies and sound) , for example:

    type=image

If no type is specified, the statement defaults to all image types (but not movie or sound).

#### CurrentRecord

The currentrecord option specifies whether images are added only to the current record, or if they are added to new records. There are three possible values for this option: oneimage, yes and no. (If the currentrecord option is omitted, the default is no.

If this option is set to oneimage, the dropped image will replace the current image in the database. If multiple images are dropped only the first image will be used, any others will be ignored.

If this option is set to yes, all dropped images will be added to the current record only (as a carriage return delimited array). This allows multiple images per record (which could be displayed with a Matrix Object).

If this option is set to no, dropped images will be added to new records at the end of the database (unless they are duplicates and the skipduplicate option has been set to no).

#### SkipDuplicates

If the skipduplicates option is set to yes, images that are already in the database will not be re-added. The default if this option is not included is yes

#### HFS

Usually the image paths that are placed into the database are in UNIX format. If you would prefer HFS format, set this option to yes. (Note: In Panorama 6 HFS was the default, so you’ll need to add this option for existing applications if you want to continue using HFS.)

#### RelativePaths

If this option is set to yes, only images that are in the same folder or in sub-folders of the database will be added. Any images in other locations will be ignored. Instead of storing the absolute location of the image (starting with the disk name) relative paths will be used. The advantage of relative paths is that the database and images can be moved to a different location or even a different computer and the images will display correctly without adjustment. The disadvantage is that images that are not in the same folder as the database (or subfolders of that folder) cannot appear in the database. The default for this option is no.

#### Message

If this option is yes, the statement will display an alert with the results (how many images added and skipped).

#### Notify

If this option is yes, the statement will display a notification with the results (how many images added and skipped). The default is yes unless the message option has been enabled.

#### Dictionary

If this option is yes, the statement will create a fileglobal variable named _DropImageResults. This variable will contain a dictionary with four elements: NEWIMAGES, DUPLICATEIMAGES, OUTSIDEIMAGES and MESSAGE. You can use the getdictionaryvalue( function to extract the elements from this dictionary to do your own custom reporting of the results from the DropImagesFromFinder statement. For example you could use these results to create a log of images added to the database.

NEWIMAGES is a carriage return delimited list of the new images that have been added to the database, including full paths.

DUPLICATEIMAGES is a carriage return delimited list of images that were dropped but were not added because they were duplicates of existing records.

OUTSIDEIMAGES is a carriage return delimited list of images that were not added because relative paths were specified and these images were outside of the database folder (so no relative path could be used).

MESSAGE is the message that will be displayed if the message option is used.

See Also

- dragtext -- starts drag-and-drop of text.
- dropfromfinder -- processes any files or folders that have been dropped on a form from the finder.
- info("dropdatabase") -- returns the name of the database that contains the form data was dropped on.
- info("dropfiles") -- returns a list of files dragged onto a *Drag Receiver* form object (see Drag and Drop).
- info("dropform") -- returns the name of the form data was dropped on.
- info("dropobject") -- returns the name of the object that data was dropped on.
- info("droptext") -- returns text dragged onto a *Drag Receiver* form object (see Drag and Drop).
- info("droptypes") -- returns a list of all the data types dragged onto a *Drag Receiver* form object (see Drag and Drop).
- info("dropvcard") -- returns the text of any VCards dragged onto a *Drag Receiver* form object (see Drag and Drop).
- info("dropwindow") -- returns the name of the window that contains the form data was dropped on.
- info("dropwindownumber") -- returns the number of the window that contains the form data was dropped on.

History

Version | Status | Notes
10.0 | Updated | Carried over from Panorama 6.0, but now defaults to UNIX format.