Validation problem [message #398379] |
Thu, 16 April 2009 02:25 |
sivajyothi.kalikiri
Messages: 29 Registered: March 2009
|
Junior Member |
|
|
I have one mater table item, amt_total which is sum of the detail block item amount(summarized item).
i had one more item dummy_total,(i will get the value from a button).
what's my requirement is i have to check the dummy_total is equal to amt_total(master item)
I wrote the following code in when-validate-record trigger of master block,
BEGIN
IF :T_CBJ_DTL.AMOUNT <> :T_CBJ_MST_BLOCK.DUMMY_TOTAL
THEN
MESSAGE('AMOUNT IS NOT MATCHING');
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;
when amount is not matching, i am getting the message five times
and after thet it is clearing the blocks
I checked the same code in when-validate -item of amt_total
it's not working.
any suggestions for validation...........
|
|
|
|
|
|
|
Re: Validation problem [message #398629 is a reply to message #398619] |
Thu, 16 April 2009 23:59 |
sivajyothi.kalikiri
Messages: 29 Registered: March 2009
|
Junior Member |
|
|
Yes, i am fetching 5 columns corresponding to 1 item, in that this dummy_total is also there.
Is this the reaon why i am getting the message 5 times.
So, what i have to do for no t getting these messages repeatedly.
|
|
|
|
|
Re: Validation problem [message #398692 is a reply to message #398649] |
Fri, 17 April 2009 02:39 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
I have just had a quick look at the documentation amd it suggests placing your code in the 'post-Text-Item'.
Question: Is this a new form? Does it contain much hand written code?
Search this forum for 'claculation' and see how other people have done it.
David
|
|
|