Home » Developer & Programmer » Forms » New Form Instance Problem
New Form Instance Problem [message #621136] Sun, 10 August 2014 01:15 Go to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
i have a Dash boar form ,,which have the block of demand which is query only block,for the new demand another demand form is call from dash board,when i called the demand form and add new demand ,,i want to show this demand in dash board demand block automatically whithout the close the dashboard form ,,,i execute the block at the new form instance of Dash board ..
how i can handle it.
Re: New Form Instance Problem [message #621152 is a reply to message #621136] Sun, 10 August 2014 09:55 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Research timer, which might help you periodically perform EXECUTE_QUERY in the demand block.
Re: New Form Instance Problem [message #621209 is a reply to message #621152] Mon, 11 August 2014 11:24 Go to previous messageGo to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
is there any trigger which has been called when focus is returned to the main form..?
Re: New Form Instance Problem [message #621220 is a reply to message #621209] Mon, 11 August 2014 14:29 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't think so (at least, I can't remember such a trigger).

However: how do you call the "demand" form? Suppose it is a WHEN-BUTTON-PRESSED trigger. Try with
-- call the "demand" form and enter a new record
call_form('demand_form');

-- the "demand" form has been closed and you're now back in the dashboard form. So - execute query and see what happens!
execute_query;
Re: New Form Instance Problem [message #621815 is a reply to message #621209] Mon, 18 August 2014 10:46 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
Quote:
is there any trigger which has been called when focus is returned to the main form..?

Yes, the When-Window-Activated (WWA) trigger executes. Therefore, you could simply execute the Execute_Query() built-in each time your WWA trigger fires.

If you want it to fire only when a new record has been added, then you could assign a value to a Global Variable in your DEMAND form and then look at this value in your WWA and only call the Execute_Query() built-in when it is a certain value. Make sure you reset the Global Variable after you call the Execute_Query() built-in. For example:

/* Sample When-Window-Activated trigger */
/* Code is untested...                  */
BEGIN
   IF ( NAME_IN('GLOBAL.DEMAND_INSERTED') = 'Y' ) THEN 
      :GLOBAL.DEMAND_INSERTED := 'N';
      Go_Block('YOUR DEMAND BLOCK');
      Execute_Query;
   END IF;
END;


Hope this helps,
Craig Cool...
Re: New Form Instance Problem [message #621830 is a reply to message #621815] Mon, 18 August 2014 15:01 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
WWA? Thank you, today I learnt something new!
Re: New Form Instance Problem [message #621831 is a reply to message #621830] Mon, 18 August 2014 15:19 Go to previous message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Littlefoot wrote on Mon, 18 August 2014 16:01
WWA? Thank you, today I learnt something new!


Me too Littlefoot.
Previous Topic: How to trap forms-java code error
Next Topic: frm-92100 your connection to the server was interrupted.
Goto Forum:
  


Current Time: Thu Apr 25 18:54:38 CDT 2024