romz.baan
8th July 2011, 06:39
Is it Possible to call a form similar to Opendialogbox from Visual Basic here in ERP Ln? Because i want to specify the file location where i could save my flat file by browsing through the folders. anything similar with this form would be helpful..

kishoremeher
8th July 2011, 10:19
check out this function.

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

bdittmar
8th July 2011, 11:45
Is it Possible to call a form similar to Opendialogbox from Visual Basic here in ERP Ln? Because i want to specify the file location where i could save my flat file by browsing through the folders. anything similar with this form would be helpful..

Hello,

use inputstring from :

#pragma used dll ottdllinputstr

(! works only in Worktop, BW NOT in WebTop !)

Regards

romz.baan
16th July 2011, 04:19
check out this function.

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

what dll do i need for this function? An error is saying: Argument 4 for function seq.saveas.dialog.local' should be call by reference.

and can u tell me where can i see these dll's? I mean should i download them from infor or are they already included in the directory, just need to call them?

thank you.
romz

bdittmar
16th July 2011, 15:06
what dll do i need for this function? An error is saying: Argument 4 for function seq.saveas.dialog.local' should be call by reference.

and can u tell me where can i see these dll's? I mean should i download them from infor or are they already included in the directory, just need to call them?

thank you.
romz

Hello,
if using:

seq.open.dialog.local()
Syntax:

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 Webtop.

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

Context

This function can be used in all script types.

AND ------

seq.saveas.dialog.local()
Syntax:

function long seq.saveas.dialog.local (string defaultname, string directory, string filter, ref string filename)

Description


This shows the Windows file save-as dialog, to allow the user to select a new or existing local file to be saved.


Arguments

string defaultname The default filename shown in the file save-as 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 Webtop.

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.


Return values

1 One file selected by the user.
0 File save-as dialog canceled by the user.
-1 Error occurred

Context

This function can be used in all script types.



Regards

kishoremeher
22nd July 2011, 12:27
This is the standard dll already present.

declare the dll ottdllbw in declaration section like -

#pragma used dll ottdllbw

Here is an simple example.
Also check the attachment.

declaration:

extern domain tcmcs.str100 filename

#pragma used dll ottdllbw

function extern browse() |define a form command that call this function
{
if seq.open.dialog.local( false, "", "","CSV Files(*.csv)|*.csv|All File(*.*)|*.*", filename ) > 0 then
mess("tigenstring", 0, "Success . . .")
else
mess("tigenstring", 0, "Cancelled . . .")
endif
display.all()
}