shaboo
1st September 2004, 18:32
Is there a standard way of displaying a message with Continue/Cancel options to a user in BaanIVc4?

I am developing a session and on a certain condition I want to display a message box to the user for the confirmation if he would like to continue or cancel the process.

Thanks in advance for the help.

lbencic
1st September 2004, 21:12
These are posed as Questions instead of messages. You set up a question in Maintain Questions, for this you can use the tcyesno domain. Something like:
Question Code: tisfc0101.01
Question: "This condition has occured - do you want to continue?"
Domain: tcyesno (or find / create a continue / cancel enumerated domain)

Then, in your code you put:


if my.condition() then
if ask.enum("tisfc0101.01", tcyesno.yes) = tcyesno.no then
|* This condition has occured - do you want to continue?
exit from logic
endif
endif


The ask.enum presents the question box to the user, much like the message box but with the Yes / No options. Normally the program will be stopped until the user presses one or the other. The tcyesno.yes in the ask.enum is the default answer the user will see and will occur if they hit enter. Checking if it = tcyesno.no means did the user choose no.

Search for "ask.enum" in the Wiki to find the Baan help on that subject.

shaboo
1st September 2004, 22:24
Great! Thanks a lot.