Link to home
Start Free TrialLog in
Avatar of joulaa
joulaa

asked on

Multirow validation on Oracle Forms database block

I have a database block on one form and on that block there is one field which needs "multirow validation".

This field "USE_ORDER" is defined so that one of the records on that block needs to have value 1 on it and only one record.

I cannot check this on field validation nor cannot I check this on record level commit processing as there might be a situation like:
Row1: User has changed value 1 -> 0
Row2: User has changed value 0 -> 1

I do not want to allow to user to continue before this situation has been solved.

How this kind of multirow validations are recommended to be handled in Oracle Forms?
Avatar of Milleniumaire
Milleniumaire
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi joulaa, so it is possible that the user enters a value into this field for every record in the block, but you don't want this to be validated until they commit the data at which point it should be rejected because only one record can have a value of 1 in that field?

Does the field USE_ORDER only exist for the purpose of selecting an order that is currently displayed in the block?  Is there anything that relates the rows that are displayed in the block, for which only one can be identified as having a value of 1 in USE_ORDER?  Is USE_ORDER implemented as a checkbox (1 = checked, 0 = unchecked)?

Does this field control some other processing that occurs in the form or is it simply used to update a column in a table?

Sorry for all the questions but I'm trying to understand your requirement as there are a number of ways to do this, but it depends on what you are intending to do with USE_ORDER.
Avatar of joulaa
joulaa

ASKER

Hi Milleniumaire,

First, the USE_ORDER is just a field in this table, rows are not orderred on that block by this field (the field is used elsewhere in the process as an order how these records are handled - so this block is just for insert/update/delete for basic data).

The field is length 1 number (accepted values 0,1,2). Value 1 needs be on one of the rows and also only one of the rows can have value 1.

I think it cannot be validated on this field nor it can be validated "after record". The problem is also that user might have used Forms searching/filtering so that in block there is not value 1 shown, but it is in database.

Hope I did answer all the questions...
ASKER CERTIFIED SOLUTION
Avatar of Milleniumaire
Milleniumaire
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial