Classification
OTL Syntax
CommonDialogs.FileOpenDialog(StringTerm message, StringTerm title, StringTerm initialPath, StringTerm extensions, BooleanTerm allowMultiSelect, BooleanTerm checkFileExists, ListVariable result);
Description
The FileOpenDialog activity is used to open a (runtime-specific) file selection dialog. The user can select one or more files and click to accept the selection, or can close the dialog. The dialog can be configured using the optional elements to add a title and modify behavior (such as selection of single or multiple files). The user can configure parts of the dialog behaviour, such as a title and message.
Properties
Name |
Data Type |
Class |
Default |
Cardinality |
Description
|
Message |
String |
Term |
- |
[0..1] |
The message to be displayed in the dialog to aid the user in their selection.
|
Title |
String |
Term |
- |
[0..1] |
The title to be displayed in the dialog.
|
InitialPath |
String |
Term |
- |
[0..1] |
The initial path to select
|
|
If a directory is specified, and it does not exist, or the user does not have sufficient access rights, the behaviour will be dictated by the runtime system.
|
|
Extensions |
String |
Term |
- |
[0..1] |
The optional (comma separated) list of extensions to filter in this dialog.
|
AllowMultiSelect |
Boolean |
Term |
- |
[0..1] |
The optional flag to determine if the dialog will allow the user to select more than one file.
|
CheckFileExists |
Boolean |
Term |
- |
[0..1] |
The optional flag to determine if the dialog must check for the file before allowing the user to complete.
|
Result |
List |
Variable |
- |
[1..1] |
The selected file(s), returned as a list of strings.
|
|
If no file is selected, the result will be returned as the empty list.
|
|
OTL Examples
/// Local Declarations
List<String> List1;
/// Flow
CommonDialogs.FileOpenDialog("This is the Message", "This is the Title", "file:///D:/ReadFile/abc.txt", "txt,zip,pnj", true, true, List1);
See also
FileSaveDialog
SelectDirectoryDialog