micku_100
4th August 2008, 15:14
Hi,

I am facing problem with ask.enum(..) function.

My requirement is on pressing "exit" by user, system should prompt whether to save existing values (yes/no) and if he opts for 'yes' then one function is exceuted.

But in any of the cases system just exits. we tried debuging and in debug we observed system is not entering into if condition and does not execute
function

System even does not print "Hi I am leaving"

Following is my code:

choice.end.program:
before.choice:

message("Hi im leaving")
if ask.enum("tdaccess.data",yesno.yes) = yesno.no then
message("Hi Im leaving")
process.report()
endif

Please suggest.

Regards,
Nilesh

mark_h
4th August 2008, 15:24
This is the correct forum for this type question - the code and utilities forum is for sharing code with the community.

How are you exiting the system? Save and exit or using the menu (Selecting File and then exit)?? There are two events you need to use choice.end.program and choice.abort.program. Try using choice.abort.program.

micku_100
4th August 2008, 15:41
Hi Mark,

Thanks for that immediate reply.

If you observe, In our code we used customised
domain variable tcyesno yesno, being used as yesno.yes/yesno.yes.

Insted we directly used tcyesno.yes/no it worked.

But I am worried why it happened

Thanks again for your help

Regards,
Nilesh