Salesforce

FileOpenDlg (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

FileOpenDlg

Opens the Windows Open File dialog box and returns the selected file(s).

Syntax:

FileOpenDlg (title, initial path, filter, check file exists, multi select)

Parameters:

title – The window title text.

initial path – The name of the initial path. This path will also accept the filename and show it in the dialog box. A blank value will use the last path chosen.
(Before version 1.9, this was: initial directory – The name and path of the initial directory. A blank value will use the last directory chosen.

filter – string. The filter string contains a description of the filter, followed by the vertical bar (|) and the filter pattern. The strings for different filtering options are separated by the vertical bar. Several filter patterns can be joined to a filter by separating the file types with semicolons. The first pair will be the default in the dialog box.

For example: 'Image Files (*.BMP;*.JPG;*.GIF) | *.BMP;*.JPG;*.GIF|All files (*.*)|*.*'

check file exists – This is a Logical type parameter that determines whether a warning message will be displayed if the user specifies a file name that does not exist.

multi select – This is a Logical type parameter that determines whether the dialog box supports multiple selections of files. In case this is True, the function will return those names delimited by a pipe ("|").

Returns:

Returns the selected files.

Examples:

FileOpenDlg ('Open file', 'c:\temp\', 'All files (.)|.', 'FALSE'LOG, 'FALSE'LOG) – Opens a File Open dialog box with default of C:\temp and the filter will show all files.

FileOpenDlg ('Open file', 'c:\temp\', 'Image Files (.BMP;.JPG;*.GIF) | .BMP;.JPG;.GIF|All files (.)|.*', 'TRUE'LOG, 'FALSE'LOG) – Opens a File Open dialog box with default of C:\temp and different filters. The file dialog box will prompt if the file does not exist.

FileOpenDlg ('Open file', 'c:\temp\', 'All files (.)|.', 'FALSE'LOG, 'TRUE'LOG) – Opens a File Open dialog box with default of C:\temp and the filter will show all files. Multiple file selection is allowed.

FileOpenDlg ('Open file', 'c:\temp\abc.txt', 'All files (.)|.', 'FALSE'LOG, 'FALSE'LOG) – Opens a File Open dialog box with default file name of abc.txt and default path of C:\temp, and the filter will show all files.

Note:

This function is available only for Online tasks.

Since version: 4.7

Reference
Attachment 
Attachment