Home » Developer & Programmer » Forms » Clear block clears form (Windows Oracle Developer 6i.)
Clear block clears form [message #606370] Thu, 23 January 2014 01:29 Go to next message
whmemon
Messages: 26
Registered: July 2011
Location: Pakistan
Junior Member

Dear Folks,

I am using developer 6i.
I am clearing block after inserting a record, but when i clear block it clears whole form.

Please help to fix this problem.

Thanks
Best Regards,
Waseem
Re: Clear block clears form [message #606378 is a reply to message #606370] Thu, 23 January 2014 02:37 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How do you do that? CLEAR_BLOCK clears a block (but that's also the whole form, if it is the only block).
Re: Clear block clears form [message #606382 is a reply to message #606378] Thu, 23 January 2014 02:54 Go to previous messageGo to next message
whmemon
Messages: 26
Registered: July 2011
Location: Pakistan
Junior Member

Below is my code.
there are some other items & blocks but when i comment last 2 lines the other blocks does not clear and when uncomemnt the all blocks clear.


GO_ITEM('CONTROL_BUTTONS.CASENO');
CLEAR_ITEM;
GO_ITEM('CONTROL_BUTTONS.CASE_YEAR');
CLEAR_ITEM;
GO_ITEM('CONTROL_BUTTONS.CBENCH');
CLEAR_ITEM;
GO_ITEM('CONTROL_BUTTONS.CASENAMECODE');
CLEAR_ITEM;
GO_ITEM('CONTROL_BUTTONS.DISCHARGETYPE');
CLEAR_ITEM;
GO_BLOCK('CASEDISCHARGE');
CLEAR_BLOCK(NO_VALIDATE);

Re: Clear block clears form [message #606383 is a reply to message #606382] Thu, 23 January 2014 03:08 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, CLEAR_BLOCK clears the current block.

Did you recompile the form (Ctrl + Shift + K) and run the form to see whether it helped?

What happens if you comment everything but the last two lines (so that only GO_BLOCK and CLEAR_BLOCK are executed)?
Re: Clear block clears form [message #606385 is a reply to message #606383] Thu, 23 January 2014 03:28 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
how many blocks are there?
what is the relationship between the blocks?
Re: Clear block clears form [message #606388 is a reply to message #606383] Thu, 23 January 2014 03:48 Go to previous messageGo to next message
whmemon
Messages: 26
Registered: July 2011
Location: Pakistan
Junior Member

There are total 5 blocks, and no relation between them.

I have check with (Ctrl + Shift + K).
when comment every thing but last 2 lines, only required items are cleared. and the table/Block(CASEDISCHARGE) does not clear, thats why can not insert new record in it.

Waseem

[Updated on: Thu, 23 January 2014 03:53]

Report message to a moderator

Re: Clear block clears form [message #606389 is a reply to message #606388] Thu, 23 January 2014 04:12 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:

table/Block(CASEDISCHARGE) does not clear


Did you correctly spell block's name? If it wasn't cleared, maybe GO_BLOCK didn't do what you thought so CLEAR_BLOCK cleared current block at the moment (the whole form would make sense if it was master block, so all its detail blocks were cleared as well. However, you said that they are not related).

Check which block you are in by checking :SYSTEM.CURRENT_BLOCK after running the GO_BLOCK statement.
Re: Clear block clears form [message #606391 is a reply to message #606389] Thu, 23 January 2014 04:23 Go to previous messageGo to next message
whmemon
Messages: 26
Registered: July 2011
Location: Pakistan
Junior Member

Got it

table/Block(CASEDISCHARGE) does not clear because non of its item is on canvas i guess, so what should i do in this case ?


Re: Clear block clears form [message #606393 is a reply to message #606391] Thu, 23 January 2014 04:29 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As you can't navigate to such a block, you'll have to clear its items manually, such as
:CASEDISCHARGE.item1 := null;
:CASEDISCHARGE.item2 := null;
...
Re: Clear block clears form [message #606395 is a reply to message #606393] Thu, 23 January 2014 04:53 Go to previous message
whmemon
Messages: 26
Registered: July 2011
Location: Pakistan
Junior Member

Thanks
Previous Topic: wcu-015: your form must contain the following bean for this function to be available : oracle.forms.
Next Topic: Run Time Error
Goto Forum:
  


Current Time: Thu Apr 25 08:04:01 CDT 2024