Home » Developer & Programmer » Forms » Validations before commiting to database
Validations before commiting to database [message #420135] Thu, 27 August 2009 03:57 Go to next message
Derek N
Messages: 80
Registered: September 2002
I have a multi row tabular form. On entering the form the table is automatically queried showing existing data in the database. The user would now start entering new records. Assume area code ,1,2,3 exists (would be displayed on entering the form) and now enters 5, 6, 7. Before comitting to the database I want a validation that would check the records that are about to be inserted into the database and display an error message informing the user that area code 4 is missing. How can I do this validation?

[Updated on: Thu, 27 August 2009 04:00]

Report message to a moderator

Re: Validations before commiting to database [message #420200 is a reply to message #420135] Thu, 27 August 2009 09:31 Go to previous message
Messages: 203
Registered: May 2006
Senior Member

Try WHEN-VALIDATE-ITEM or WHEN-VALIDATE-RECORD on the datablock where you want to write the criteria to check, then use a RAISE FORM_TRIGGER_FAILURE;, so that it won't commit until criteria is met.
Previous Topic: Display rownum in tabular form
Next Topic: How to create a search screen and display results
Goto Forum:

Current Time: Thu Jul 20 19:56:04 CDT 2017

Total time taken to generate the page: 0.25947 seconds