On-Screen-Validation [message #174393] |
Mon, 29 May 2006 01:46 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ria_saeed
Messages: 1 Registered: May 2006 Location: Singapore
|
Junior Member |
|
|
freinds,
I've a form with a multi record block. my requirement is that before creating new records the form has to go thru the records already entered in the form and check some values. Upon clearing the validation only the user would be able to create new record. The new record can be created at the last or in the middle.(If the record is created in the middle it cannot navigate out unless the required fields are filled in)
I tried it on WHEN-CREATE-RECORD trigger. But it cannot contain restricted builtin like first_record,next_record.
It would be nice of you to send me the best aproach as earliest as possible.
Thanks in advance
Ria Saeed
|
|
|
Re: On-Screen-Validation [message #174396 is a reply to message #174393] |
Mon, 29 May 2006 02:01 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
jowahl
Messages: 82 Registered: May 2006
|
Member |
|
|
i would try to solve this problem like this:
* in WHEN-NEW-RECORD-INSTANCE trigger check if record status is NEW.
* if so, set all items to VALID before trying to navigate (SET_ITEM_PROPERTY(<block.item> , ITEM_IS_VALID, PROPERTY_TRUE)
* alternativly set required off (SET_ITEM_PROPERTY(<block.item> , REQUIRED, PROPERTY_FALSE).
* after navigation and checks return to the (new) record, set item properties to the values before and let the user insert data (or delete the record if checks have failed).
* make sure that you don't run i an endless loop because finally when returning to the (new) record the WHEN-NEW-RECORD-INSTANCE trigger fires again ...
|
|
|
|
|