Forms 3.0: clear_block != clear_block?

From: Thomas Dwyer III <tomiii_at_mtu.edu>
Date: 13 May 1994 17:11:12 -0400
Message-ID: <2r0qdg$aa0_at_bambam.cts.mtu.edu>


Problem:

	How do I clear *all* fields in a given block, including those
	fields which are defined with ENFORCE_KEY_FROM pointing at other
	blocks?  CLEAR_BLOCK apparently clears all the fields in the
	block except for those fields defined with ENFORCE_KEY_FROM.


Background:

	I have a form with three blocks corresponding to three different
	tables:

	+-------------------------------------------------------+

| BLOCK 1 (shows 1 row from the table) |
| |
| BLOCK 2 (shows 5 rows from the table) |
| |
| BLOCK 3 (shows 5 rows from the table) |
+-------------------------------------------------------+ Blocks 1 and 3 each have one field defined with ENFORCE_KEY_FROM pointing to respective fields in block 2. Those same two fields in block 2 are defined with ENFORCE_KEY_FROM pointing to the fields in blocks 1 and 3. The basic idea here is that I want to enter a query in any block, depending on what query data I have to start with. I have Key-NXTBLK and Key-PRVBLK triggers which fill in the other two blocks as I navigate through the form.

There is a one-to-many relationship between blocks 1 and 2, and another one-to-many relationship between blocks 2 and 3. Suppose I perform a query in block 1, then hit NEXT_BLOCK. Block 2 is filled in with the correct rows. Now I select a record in block 2 and go to block 3. Block 3 is correctly filled in. Now I go back up to block 1 and select the next record, then go to block 2. Here's where the problem occurs. Block 2 already has its ENFORCE_KEY_FROM field filled with the value from block 1's previous record, therefore no records are selected in block 2. I need some way to clear these ENFORCE_KEY_FROM fields.

I tried doing it with triggers (e.g. ":block2.field1 := null" which does clear the field, but now the form thinks there's something to commit {sigh}.

Am I doing something wrong, or does Forms 3.0 just not let me do what I want? Any suggestions would be appreciated.

Thanks,
Tom.III
tomiii_at_mtu.edu Received on Fri May 13 1994 - 23:11:12 CEST

Original text of this message