Previous Topic Next topic Print topic


Select Local OS Resource

Function:

The "Select Local OS Resource" tool opens a native file selection dialog from the operating system to allow the user to select one (or several) local files (see figure), or an Eclipse folder selection dialog to select a local folder.

Attributes:

Attribute Type Description
Resource Type Selection Whether the selection dialog should prompt for a folder or file. If the value is “Local OS File”, the dialog will not allow the user to select a folder and vice versa.  

Possible values:

  • Local OS File (default)
  • Local OS Folder
File Dialog Behavior Selection Whether to allow selecting multiple files or use the “Selection for Save” mode, which has a slightly different appearance (e.g. confirm button is labelled “Save” instead of “Open”).  

The attribute is only visible if the Resource Type attribute is “Local OS File”, since multi-selection and “Selection for Save” are currently not supported for folders.

Possible values:

  • Single-selection
  • Multi-selection
  • Selection for Save
Title String The dialog title. If empty, the operating system default title will be used (e.g. “Open” or “Save”).
Message String Sets a user message for the folder selection dialog.  

Only visible if the Resource Type attribute is set to “Local OS Folder”, since the file selection dialog does not have a message field.

Show Optional Parameters Boolean Whether to add optional input parameters to the tool descriptor (see Input Parameters).

Parameters:

Parameter No I/O Type Meaning
1 [O] I String The pre-set path of the selection dialog.
2 [O] I String The pre-set file name of the file selection dialog.

Only available if the Resource Type attribute is set to “Local OS File”.

3 [O] I String File extension filters for the file selection dialog. While a file extension filter is active, the dialog only shows files matching the filter.

It is possible to define several filters and several extensions for each filter. While the first defined filter will always be the default filter on opening the dialog, users can select different filters (if more than one are defined).

Each filter is separated by “/”, while every extension must be separated by “;”.

Example: *.txt;*.text/*.doc;*.docx

Defines two filters with two extensions each.

Only available if the Resource Type attribute is set to “Local OS File”.

Default value: *.* (show all files)

1 [M] O String/File Used to return the selected OS resources

All input parameters of the tool are optional. They can be enabled by setting the attribute “Show Optional Parameters” to “true”.

Output parameter:

Selected files will always be returned by a single output parameter (both for single and multi-selection). Depending on the scenario where the tool should be used, it is possible to return file names in two different ways:

  1. As a property value (default).
    1. Useful for:
      1. Using selected file name(s) as input parameter for a subsequent tool.
      2. Using selected file name as “Name Physical” reference for a local file descriptor.
    2. Modeled by:
      1. Setting file output parameter type to “String”.
      2. Referencing a property as target ID.
    3. Multi selection:
      1. File names will all be written as value of the referenced property, separated by the “Out Parm Separator” of the tool descriptor.
  2. As contents of an input stream file descriptor.
    1. Useful for using the tool within a “Retrieve All Values” action (see Retrieve All Values). Users can then select a file or folder for an input field.
    2. Modeled by:
      1. Setting file output parameter type to “File”.
      2. Referencing a file descriptor of the type “Input Stream” as target ID.
    3. Multi selection:
      1. Each selected file will be added as a separate row of the input stream.
Previous Topic Next topic Print topic