Binnicol
31st March 2003, 13:34
Who can I cancel an action of a form?

For example, if I would like cancel the execution of
"choice.last.set"

I can do this:

choice.last.set:
before.choice:
"CANCEL"


Thaks a lot.

mark_h
31st March 2003, 16:20
Not sure why you would want to do it, but you could use choice.again() or execute(end.program), depending on what you wanted to do.

Mark

NPRao
31st March 2003, 21:56
Binnicol,

Can you please fill up your profile with BaaN/OS/Database info ?

As Mark said its not clear what you are looking for.

To cancel an action of a form -

1. You can disable the specific standard commands based on coditions -


function enable.disable.fields.based.on.options()
{
if not isspace(zmmig103.aplg) then
disable.fields("zmmig103.cmptype", "zmmig103.seqno", "zmmig103.comp",
"zmmig103.lnkm", "zmmig103.lmen", "zmmig103.role", "zmmig103.authl",
actual.occ)
disable.commands(dupl.occur, mark.occur, mark.delete, add.set, global.delete, modify.set)
else
enable.fields("zmmig103.cmptype", "zmmig103.comp", actual.occ)
enable.commands(dupl.occur, mark.occur, mark.delete, add.set, global.delete, modify.set)
fields.handling()
endif
}


But if you are looking for some exit actions-


choice.end.program:
on.choice:
e = file.rm(logfile)

choice.abort.program:
on.choice:
e = file.rm(logfile)


2. If you dont like the options instead of handling by coding you need not enable that option from the standard commands.