kathuria
26th July 2007, 15:00
Hi,
I have mandatory field in my table. I leaving it blank, at the time of saving I am getting standard error. I want to capture that error into variable. Can I capture this error? Because on the basis of this error I want to perform some operation.

Regards,
Sanjay

mark_h
26th July 2007, 15:28
Check out error.bypass - I believe that allows you to by pass and handle errors yourself.

kathuria
26th July 2007, 15:39
Hi,
I also want to capture standard error. Which command I will use for that.
Regards,
Sanjay

Hitesh Shah
26th July 2007, 15:41
Domain erros can be trapped in domain.error section of the field . Not sure whether mandatory input is classified as domain check or not by baan standard program .

Also for mandatory field pre-defined variable attr.mandatory is true in before.input . I dont know whather that helps u or not .

george7a
26th July 2007, 15:43
Hi,

Check the following related links:
http://www.baanboard.com/baanboard/showthread.php?t=14300&highlight=capture
http://www.baanboard.com/baanboard/showthread.php?t=7977&highlight=capture
http://www.baanboard.com/baanboard/showthread.php?t=677&highlight=capture

I hope it helps,

- George

mark_h
26th July 2007, 15:48
Check out error.bypass - I believe that allows you to by pass and handle errors yourself.
If you set error.bypass to 1 then the variable "e" should contain that error. Search the forum on error.bypass and you will see some examples.

kathuria
26th July 2007, 16:06
Hi,
I have set error.bypass = true but still not able to ge standard error.

Regards,
Sanjay

csecgn
26th July 2007, 16:12
Try the before.checks section of your field. It is executed before any domain check and as far I know before db.checks also (just found a hint for before reference checks).

hth

Regards
Christof

Hitesh Shah
26th July 2007, 20:05
AFAIK , before.checks has same input value without any validation and error messages . This can be used to do any alignment/ formatting etc of the value . Even value of attr.mandatory can be checked in this section .

If I recollect properly there is pre-defined variable attr.message$ which will give u the message code which will be used in case of domain error .

e will have value only in case of bshell / db driver errors . This standard program error will change the value of e .