amyumyun
11th October 2005, 19:30
Hi,
I have the following combination of the "elements":
Project 1, Element 2, Activity 3
The system has to pop-up an error message while been entered the correct combination, which is:
Project 5, Element 2, Activity 6
The system checks the combination every time when I enter new value and try to "jump" to another field.
If I enter "Project 5" and press the TAB button the system pops-up an error message and retunts me in the same fild. It also "remembers" the OLD value - Project 1 in the fied.
You can see that I can't enter the correct combination, never!
Is there any way- (within BaaN) to be shown an error message and to "remember" the new value of the field?
In this way I will be able to enter the correct combination after the second iteration.
Thanks in advance!
mark_h
11th October 2005, 20:04
Is this your own session or a baan session? If a baan session which one and do you have source code? I do not understand why all three fields are being checked after the input of project only.
amyumyun
11th October 2005, 20:32
Is this your own session or a baan session? If a baan session which one and do you have source code? I do not understand why all three fields are being checked after the input of project only.
It is a session of BaaN and I am trying to customize it. It is "Maintain Hours Transactions" in Projects (TP)/Hours Registration. Yes I have the source.
All three fields are being checked after the input of project, becouse I use a function which checks if the all fields have been maintained. If it's "true" I perfom additional check "Is the combination correct?". It is necessary becouse I can fill the fields in different order (this is a standard functionality of the system).
mark_h
11th October 2005, 21:03
Why not place this addition check only in the check input of the activity only? This way the error only gets hit once.
You can try using input.again. I think this leaves the value alone.
amyumyun
11th October 2005, 21:45
Why not place this addition check only in the check input of the activity only? This way the error only gets hit once.
You can try using input.again. I think this leaves the value alone.
How will I catch the wrong Project for example? I can fill right Activity and then wrong Project or Element and try to save the record. The system doesn't restrict me in which order I will fill the fields.
lbencic
11th October 2005, 21:59
You may want to try like:
main.table.io:
before:write:
my.checks()
before.rewrite:
my.checks()
......
functions:
function my.checks()
{
if (your code for not valid) then
message
abort.io("")
endif
}
Note that in a multi occurance form it will only call this when the save button is pushed, but it will call it for each record. So you may want to include information about which record is bad when you send the message.
amyumyun
11th October 2005, 22:20
You may want to try like:
main.table.io:
before:write:
my.checks()
before.rewrite:
my.checks()
......
functions:
function my.checks()
{
if (your code for not valid) then
message
abort.io("")
endif
}
Note that in a multi occurance form it will only call this when the save button is pushed, but it will call it for each record. So you may want to include information about which record is bad when you send the message.
"For each record" you mean for each field or for each complete record (whole fields)?
mark_h
11th October 2005, 22:50
Lisa's idea is much better than mine. Each whole record will be processed thru the main table routine.
amyumyun
12th October 2005, 21:41
Thank you!
:)