11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CLEAR_RECORD built-in<br />

Description<br />

Causes <strong>Form</strong> <strong>Builder</strong> to remove, or flush, the current record from the block, without performing<br />

validation. If a query is open in the block, <strong>Form</strong> <strong>Builder</strong> fetches the next record to refill the block, if the<br />

record space is no longer filled after removing the current record.<br />

A database record that has been cleared is not processed as a delete by the next Post and Commit<br />

Transactions process.<br />

In a default master-detail block relation, clearing the master record causes all corresponding detail<br />

records to be cleared without validation.<br />

Syntax<br />

PROCEDURE CLEAR_RECORD;<br />

44<br />

Built-in Type restricted procedure<br />

Enter Query Mode yes<br />

CLEAR_RECORD examples<br />

/*<br />

** Built-in: CLEAR_RECORD<br />

** Example: Clear the current record if it’s not the last<br />

** record in the block.<br />

*/<br />

BEGIN<br />

IF :System.Last_Record = ’TRUE’ AND :System.Cursor_Record =<br />

’1’ THEN<br />

Message(’You cannot clear the only remaining entry.’);<br />

Bell;<br />

ELSE<br />

Clear_Record;<br />

END IF;<br />

END;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!