VishalMistry
15th December 2015, 13:46
Hi all,

Is there any standard way to open a dialog box that allows to select a file on client machine ?

Vishal

kevalghelani
15th December 2015, 14:07
Hi Vishal,

You can use following function(i.e seq.open.dialog.local):

Syntax:
#include <bic_desktop>

function long seq.open.dialog.local (boolean mselect, string defaultname, string directory, string filter, ref string filename)

Description

This shows the Windows file-open dialog, to allow the user to select one or more local files.


Arguments
boolean mselect When true, multiple select is allowed by the user else only one file can be selected by the user.

string defaultname The default filename shown in the file-open dialog.

string directory The startup directory for this dialog. In case of an empty string the "My Documents" directory will be the default. This parameter may include the string ${BSE_TMP} which indicates the ${BSE}\tmp directory in case of Baan Windows or Windows temp directory in case of WebUI.

string filter This argument specifies all possible file extensions for the file. The string must contain pairs of strings that are separated by a "|" character. The first string in each pair is a filter name (for example: "Text Files"). The second string must be a filter patern (for example: "*.txt"). Multiple filter patters can be specified by separating the filter patterns with a semicolon. Example: "All Files(*.*)|*.*|Text Files(*.txt) Word documents(*.doc)|*.txt;*.doc"

ref string filename Output argument which will contain the full path of the file selected by the user. In case mselect is true possible other selected file names can be retrieved using function seq.open.dialog.next()


Return values
>0 Number of files selected by the user.
0 File open dialog canceled by the user.
-1 Error occurred

VishalMistry
16th December 2015, 11:22
Hi Keval,

The functionality is required in Baan IV. I know it is available in ERPLn.

Vishal

shashig
16th December 2015, 11:57
Vishal,

You can use use baanfileselector.exe, a VB based utility in baan iv. It's the one used by most users in baan IV.

You can find the file using a simple search, i think in code and utilities section.

It's a tool which should can be placed on server, and which should be copied to client temp folder and it works same as windows open file dialog and when user selects the file, it writes the filepath in a file which can be read by the program. You can even set the File extension filter in that utility.

Check Link : http://www.baanboard.com/baanboard/showthread.php?t=26814

Regards,
Shashikant