Home » Developer & Programmer » Forms » clear block
clear block [message #514704] Wed, 06 July 2011 00:30 Go to next message
goparaju
Messages: 54
Registered: June 2011
Member
Hi,

I am working on form builder 6i.

I have FIND widnow and MAIN window.


FIND Window: contains field1 and field2, FIND Button.

It's attached a torch symbol.

MAIN Window:

block A: Multi record data block on table t1. It contains field1,field2,field3.

block B: non datablock, it contains field4, field5.

If i enter something and click FIND button, it will populate data in Block A.

If i put the cursor in any record in block A, and after that put the cursor in Block B, it will populate block B related to Block A record.

For this, In Block A--> post record(block level) trigger, i am capturing values in variables.

:GLOBAL.f1:=:BlockA.field1
:GLOBAL.f2:=:BlockB.field2

In Block B--> When-New-Block-instance(Block Level)

select field3, field 4 from t2 where t1=:global.f1 and t2=:global.f2;

and populating data in block B.

It's working fine.

REQUIREMENT: If i click the FIND second time, in Block B--> it's retaining previous value. I want to clear the block B once i click the FIND button.

I tried to write in POST-BLOCK (Block B-->block level)

CLEAR_BLOCK('NO_VALIDATE');

But it's not working.


Could somebody help me In which trigger i have to write code to clear block.

Kindly help.
Re: clear block [message #514708 is a reply to message #514704] Wed, 06 July 2011 00:57 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You answered the question yourself:

Quote:

I want to clear the block B once i click the FIND button.

So - which trigger would that be?
Re: clear block [message #514761 is a reply to message #514704] Wed, 06 July 2011 06:40 Go to previous messageGo to next message
goparaju
Messages: 54
Registered: June 2011
Member
Hi,

Thanks for your reply. If i press find button 2nd time, the MAIN WINDOW is behind FIND window. I think, it's not firing the post block of BLOCK B. This might be the reason,it's not clearing it.

Could you suggest me in which trigger we need to write the code to clear block B when you search from second time.

Note:If i press FIND Window, MAIN Window presents behing FIND window.

Thanks for your help.
Re: clear block [message #514762 is a reply to message #514761] Wed, 06 July 2011 06:46 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'd try WHEN-BUTTON-PRESSED on the "FIND" button.
Previous Topic: Dynamically passing where condition
Next Topic: Access file from server via static ip at outside lan
Goto Forum:
  


Current Time: Mon Sep 16 12:26:03 CDT 2024