$filebrowse

$filebrowse

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

$filebrowse

Presents the application user with a File Open common dialog box.

Syntax

$filebrowse(directorypath, pattern, flags ,[heading])

Parameters

directorypathA character string or an expression that evaluates to a character string, naming the default directory path to show in the dialog box. If path is the null string (”), the current directory is used as the default directory.
patternA character string or an expression that evaluates to a character string, specifying the pattern names and associated patterns that can be searched for, in the dialog box. If pattern is the null string (”), no patterns are searched for. Otherwise, pattern is specified in the form:
“patternname1|pattern1[«|patternname2|pattern2»]”
flagsA number or an expression that evaluates to a number, determining the attributes of the dialog box.
headingA character string, or an expression that evaluates to a character string, setting the title for the dialog box.
FlagsMeaningConstant Name
0The dialog box opens for saving a file. 
2Path must exist.cPathMustExist
4Prevent read-only files from being returned.cNoReadOnlyFiles
8Enable multiple selections.cAllowMultiSelect

Flags can contain any single number, or the sum of two or more numbers from the Flags column.

Return Value

For EntitySets, relationships, and application directories, the value returned is the number associated with the disk file that contains the specified object.

For application documents, the value returned is the number associated with the disk file that contains the application directory in which the application document was created.

Comments

Use $filebrowse to display the File Open common dialog box and select a file.

The value returned by the function depends on the application user’s interaction with the dialog box:

  • If the application user activates the Cancel push button, $Null is returned.
  • If the application user makes a selection (multiple selections not enabled), the function returns the directory path concatenated with the file name.
  • If the application user makes a selection (multiple selections enabled), the function returns the directory path and a list of one or more file names separated by semicolons.

Example

A properly constructed pattern appears as shown below:

'All files |*.*|ZIM files|*.zim;zim0*'

In the following code fragment, the variable vIconFileSel is assigned the results of the user’s interaction with the File Open dialog box:

let vIconFileSel= $filebrowse ($concat($DBPath, "\Icons"), "Icon files|*.ico|All files|*.*", cFileMustExist + cPathMustExist, "Icon File Selection")
Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Leave a Reply

Your email address will not be published. Required fields are marked *

en_CAEnglish