Home » Developer & Programmer » Forms » On-Screen-Validation
icon1.gif  On-Screen-Validation [message #174393] Mon, 29 May 2006 01:46 Go to next message
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 messageGo to next message
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 ...

Re: On-Screen-Validation [message #174526 is a reply to message #174396] Mon, 29 May 2006 08:04 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Quote:

Upon clearing the validation only the user would be able to create new record.
Please reword this. How about typing the words in the assignment.

David
Re: On-Screen-Validation [message #182177 is a reply to message #174393] Thu, 13 July 2006 07:36 Go to previous message
bhupinderbs
Messages: 67
Registered: July 2006
Location: Bangalore
Member
Hi

You can create Run Time record group to restrict users to enter duplicate data.

Bhupinder Singh
Previous Topic: Adding item to the Datablocks
Next Topic: push button
Goto Forum:
  


Current Time: Fri Sep 20 10:48:50 CDT 2024