lindar
29th January 2010, 01:15
User want to limit the number of items on a report..the ask.enum only gives my either/or options...I have tried input.string() but receive unresolved referance to function...have not been able to find documentation on input.string()...any help appreciated..

MilindV
29th January 2010, 06:10
Hi Lindar,

use dll ttdllinputstr for input.string()

function extern long input.string(
string mwindow.title(80) mb,
string label(80) mb,
long p.width,
long f.width,
ref string pattern() mb )

This function starts a main window with given title.
This window contains:
- a label, indicating the string to be asked for
- an input field with given width (p.width) and number
of visible characters (f.width)
- two buttons (OK and Cancel)
The string value of the input field will be stored in pattern argument

Pre: only to be used in graphical environments
Ret: true: succes, pattern will be filled
false: error, action canceled

george7a
29th January 2010, 13:20
Here is an example:
http://www.baanboard.com/baanboard/showthread.php?p=126660&highlight=input.string#post126660

You might want to check the DLLusing bic_info and see what are the arguments in your system.

lindar
21st April 2010, 22:04
Sorry, other projects were moved to top of to-do-list, now back to this problem...I have tried this solution. It tells me - Fatal error Can't open DLL 'ottdllinputstr' for reading....
tried entering function in the sql and just tells me the variables are declared but never used...Any help on what I am missing is appreciated...

mark_h
21st April 2010, 22:28
Look in the $BSE/tools directory and make sure you have ottdllinputstr. I just noticed your version 3.1b and maybe it does not exist. I have it on 4c4.

lindar
21st April 2010, 23:11
no I didn't find that when I searched, any other suggestions? I have tried to add the function into my program, but I quess I need more code for it to work. Any other way to ask for a variable?

günther
22nd April 2010, 11:06
In fact input.str() is a handy function to create a limited dialog. If you don't have that function on your system, you could create a subsession (use Zoom Type = Modal Dialog to make it look like more like a dialog).

Main Session:
- extern domain tcmcs.long a.long
- a.long = ... to set the default value; zoom.to$() to call the subsession

Subsession:
- extern domain tcmcs.long a.long
- zoom.from.all/on.entry: import("a.long", a.long)
- zoom.from.all/on.exit: export("a.long", a.long)

Btw. this is more generic than input.str() because you can use *real* data types (not only a string) and you are not limited to one value.

Günther