Re: Where best to validate multi-row block

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Mon, 26 Jul 2004 08:22:20 -0400
Message-ID: <DfmdneL266NPapncRVn-qw_at_comcast.com>


[Quoted] "Roy Munson" <mtproc_at_yahoo.co.uk> wrote in message news:853055e7.0407260247.320beb34_at_posting.google.com...
| Hi Guys....neither of these solutions works as the data has not been
| posted to the database. So for example in the parent block i enter 10.
| In the multi-row child i enter one row with the value 6 and a second
| row with the value 5.
|
| In a pre-commit the data has not been posted to the database so the
| validation of summing the child details will return zero each time.
| Data then get committed and you have a summ of 11 stored where the top
| block stated 10 to be the total value allowed.
|
| For when-validate-item....this is pretty much the same.
|
| The validation needs to be after data posted but before commit
| transaction completed.
|
| Anybody got any clues...this must be a fairly regular scenario.
|
| TIA
|

presumably the assumption with the other suggestions is that you would validate the data in the blocks, not the data that has already been written [Quoted] to the database -- so they do work with that proviso

however, if you prefer to validate after rows have been written to the database, but before they are committed, you need to issue a forms POST command somewhere in your code prior to the validation -- as i recall, POST [Quoted] will cause a message to be generated, so you also may need to set the MESSAGE_LEVEL setting, or use an ON-MESSAGE trigger (going by memory, sorry [Quoted] if i didn't get the names quite right)

however, you need to make sure what you are validating -- just the master/detail records that are being maintained via your form, or the master [Quoted] record being maintained via your form and any and all detail records that exist in the database (whether or not they were maintained via your form)

++ mcs Received on Mon Jul 26 2004 - 14:22:20 CEST

Original text of this message