Home » Developer & Programmer » Forms » Validation problem (forms 6i)
Validation problem [message #398379] Thu, 16 April 2009 02:25 Go to next message
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 #398594 is a reply to message #398379] Thu, 16 April 2009 20:43 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I assume that you have 5 records displayed on your canvas and that you have code that is manually moving through the records. Is this correct?

David
Re: Validation problem [message #398615 is a reply to message #398594] Thu, 16 April 2009 23:13 Go to previous messageGo to next message
sivajyothi.kalikiri
Messages: 29
Registered: March 2009
Junior Member
NO, I am not displaying 5 records
Re: Validation problem [message #398619 is a reply to message #398615] Thu, 16 April 2009 23:27 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
In your block definition are you fetching 5 rows?

David
Re: Validation problem [message #398627 is a reply to message #398619] Thu, 16 April 2009 23:54 Go to previous messageGo to next message
sivajyothi.kalikiri
Messages: 29
Registered: March 2009
Junior Member
No, I am not fetching any rows
Re: Validation problem [message #398629 is a reply to message #398619] Thu, 16 April 2009 23:59 Go to previous messageGo to next message
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 #398643 is a reply to message #398629] Fri, 17 April 2009 01:15 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Put this code into the When-Validate-Item that holds your data, not at the block level.

David
Re: Validation problem [message #398649 is a reply to message #398643] Fri, 17 April 2009 01:22 Go to previous messageGo to next message
sivajyothi.kalikiri
Messages: 29
Registered: March 2009
Junior Member
I tried that also, it's getting the same thing.
Re: Validation problem [message #398692 is a reply to message #398649] Fri, 17 April 2009 02:39 Go to previous message
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
Previous Topic: Calling a SAP RFC from an Oracle Form - using OLE?
Next Topic: Problem with jar caching on client
Goto Forum:
  


Current Time: Sat Nov 02 13:57:49 CDT 2024