muheeb
15th November 2002, 11:17
Hi all,
I have a question about "Maintain Questions" in tools.
How can I use these defined questions (question codes)
in program script to get like Yes/No question in program
scripts.
Thanks.
Paul P
15th November 2002, 11:57
Dear muheeb,
You can use the function below:
domain ask.enum( string quescode(10), domain default_enumval [ arg ] ... )
Rgds,
Paul
muheeb
18th November 2002, 15:58
Hii,
Thank you very much for answering...
this function need an include for libaray or something???
Can you please explain what "default_enumval" usage of?
Thanks.
lbencic
18th November 2002, 21:29
If you have defined in Maintain Questions:
Code: tihras9101a
Question: Process Time for Employee %d?
Domain: tcyesno
You would write in your code to call the question:
if ask.enum("tihras9101a", tcyesno.no, tihra900.emno) = tcyesno.yes then
process.time()
endif
The tihras9101a refers to the question number.
The tcyesno.no refers to the default answer - no
The tihra900.emno will fill the %d parameter in the question with the employee number stored there.
Hope that helps.
Paul P
19th November 2002, 02:50
Dear muheeb,
Sorry, I should have provided you with the link to the long explanation on ask.enum() available in BB library. Anyway, here it is:
ask.enum (http://www.baanboard.com/programmers_manual_baanerp_help_functions_enumerates_ask_enum)
Rgds,
Paul