This content has been marked as final. Show 5 replies
948611 wrote:Hi, Siva
I have a multi block child record. In that there are series of columns ....say column 1 to 6.
I am validating these columns against certain values and if the validation fails , I am raising when form trigger failure
I am doing this at the when validate record of the block level.
values := VARCHAR2 (1000) ;
values := :b1.c1||:b1.c2||:b1.c3||:b1.c4||:b1.c5||:b1.c6;
validation_flag = 'N'
1) What should be the appropriate to handle this since this validation should happen if all the six segments are entered.
There is no particular order in which the six segments are entered.
Dont think when validate record s the correct one.
2) As a work around, this message is being thrown after the user tries to save the record but he is able to navigate to the next record when he presses a down error. This shouldnt happen if the user wants to save the data.
the above are the 2 options we are considering
Please provide your poitners.
You can validate combination of item via WHEN-VALIDATE-RECORD trigger. this will be the easy choice. I prefer it.
but you can also validate at any item (should be the last one) via When-Validate-Item trigger. for this.. you need to create a program unit (procedure) and call in every item trigger. The last filled item will fire.
When saving is not good one as because it's multi record tabular block.
Hope this helps...
Mark correct/helpful to help others to get right answer(s).*
If I understood you correctly then you need to check those (in your example) 6 columns. If all of those column's values passes some test then you are good to go on the contrary you should raise an error. Is that right?
If so then on when-validate-record you should write something like that :
if :b1.col1 != same_check_value OR :b1.col2 != same_check_value OR ...
Also I am a little confused reading your second question. The raising of form_trigger_failure on when-validate-record should always stop user from navigating elsewhere. Or is it that you want to let the user navigate away form this record regardless this record is not validated (did not pass validation test) and you want just to stop the user when he/she is trying to save the input?
Edited by: gregor13 on Mar 20, 2013 6:22 PM
Edited by: gregor13 on Mar 20, 2013 6:28 PM