Q: DELETE_RECORD for empty item

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 10 Apr 2004 16:34:18 -0800
Message-ID: <4078847a_at_news.victoria.tc.ca>



[Quoted] I'm using Forms Developer 6i (I think - the full version information is at the end of this post, who knows what it means).

A data entry form is set up like this... Each item on the form corresponds to the same column but in different rows of the table. I.e. If there are ten item fields on a form, and if values were entered in five of them then we would end up with five new rows in the table. (Each row is one of an arbitrary number of parameters, which is why it was originally set up this way.)

The following problem occurs.

[Quoted] The user enters a value in one field - a row is implicitly inserted.

The user does other stuff.

The user returns to that field and uses the backspace or delete key and removes all the characters.

The column now has a null value, which isn't allowed.

To continue, the underlying row must be deleted. The user can do this easily enough by simpy pressing a [Delete Current Record] button, but it is not obvious to the users that this needs to be done so they don't do it.

My PROBLEM: how can I best detect the value has become set to null and automatically delete the underlying row?

I can't detect this as an error and simply delete any rows with null values because the DELETE_RECORD builtin can't be called during an error handler.

I looked up some likely looking triggers, e.g. WHEN-VALIDATE-RECORD, and POST-TEXT-ITEM, but both say they occur during navigation, which is exactly when the documentation says the restricted builtin DELETE_RECORD is not allowed to be run.

So, I'm hoping for suggestions on how best to delete a row when the value in the field for the item is emptied.

Thanks



 Version from "About Form Builder..."

Forms [32 Bit] Version 6.0.8.8.0 (Production) Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production

     With the Partitioning, OLAP and Oracle Data Mining options
     JServer Release 9.2.0.4.0 - Production
Oracle Toolkit Version 6.0.8.12.1 (Production) PL/SQL Version 8.0.6.0.0 (Production)
Oracle Procedure Builder V6.0.8.12.1 Build #520 - Production PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production) Oracle Query Builder 6.0.7.1.0 - Production Oracle Virtual Graphics System Version 6.0.5.37.0 (Production) Oracle Tools GUI Utilities Version 6.0.5.35.0 (Production)
Oracle Multimedia Version 6.0.5.34.0 (Production)
Oracle Tools Integration Version 6.0.8.13.0 (Production)
Oracle Tools Common Area Version 6.0.5.32.1
Oracle CORE Version 4.0.6.0.0 - Production Received on Sun Apr 11 2004 - 02:34:18 CEST

Original text of this message