Home » Developer & Programmer » Forms » Linking Forms based on criteria (Oracle 10g)
Linking Forms based on criteria [message #641259] Wed, 12 August 2015 08:24 Go to next message
ORA2015
Messages: 49
Registered: March 2015
Member
Hello,

I am trying to link one form to another with the click of a button but it should be linked to the values that is shown in the first form. How do i do that?

what i have currently is
BEGIN
CALL_FORM('\\server1\forms\test.fmx');
END;

how to add in the where clause where it will map the matching value from one form to the next?
Re: Linking Forms based on criteria [message #641260 is a reply to message #641259] Wed, 12 August 2015 08:25 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Read up on form paraemeters and how to pass them in form builder help
Re: Linking Forms based on criteria [message #641261 is a reply to message #641260] Wed, 12 August 2015 08:28 Go to previous messageGo to next message
ORA2015
Messages: 49
Registered: March 2015
Member
I did but i am not understanding the explantion
Re: Linking Forms based on criteria [message #641262 is a reply to message #641261] Wed, 12 August 2015 08:29 Go to previous messageGo to next message
ORA2015
Messages: 49
Registered: March 2015
Member
what i have currently is just opening the next form but not with the matching values. It is a blank form
Re: Linking Forms based on criteria [message #641263 is a reply to message #641262] Wed, 12 August 2015 08:32 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
You'll have to give us a clue as to which bits you didn't understand.
But simply:
1) Create paremeters
2) call new form
3) Have new form use parameters in where clause on block
4) Execute query in when-new-form-instance trigger of new form.
Re: Linking Forms based on criteria [message #641264 is a reply to message #641263] Wed, 12 August 2015 08:35 Go to previous messageGo to next message
ORA2015
Messages: 49
Registered: March 2015
Member
I want everything to take place when the button is pressed and not in the when new form instance.

Say the first form has a value of 'tim'. When i click on the button in the first form i must see the details in another form with a matching value 'tim'
Re: Linking Forms based on criteria [message #641265 is a reply to message #641264] Wed, 12 August 2015 08:45 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
And I've just told you what to do. So what exactly is the problem?
Re: Linking Forms based on criteria [message #641266 is a reply to message #641264] Wed, 12 August 2015 08:47 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
ORA2015 wrote on Wed, 12 August 2015 14:35
I want everything to take place when the button is pressed and not in the when new form instance.


No you don't, because that makes no sense.
If you want a form to execute a query the execute_query command must be in that form, not some other one.
If you want the query to be run straight away them when-new-form-instance is the obvious place to put it.
Re: Linking Forms based on criteria [message #641267 is a reply to message #641266] Wed, 12 August 2015 08:50 Go to previous messageGo to next message
ORA2015
Messages: 49
Registered: March 2015
Member
I want it to activate by clicking on the button in the first form and not the second form.

Thanks for your help though. Much much appreciated

[Updated on: Wed, 12 August 2015 08:50]

Report message to a moderator

Re: Linking Forms based on criteria [message #641268 is a reply to message #641267] Wed, 12 August 2015 08:55 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
You're either misunderstanding what I'm saying or how forms works or both.
You have a button in the first form that creates parameters and calls the second form.
The second form, on start up, uses the paramters passed to it to execute a query. There is no code you can write in the first form that'll make this happen automatically, you have to write code in the second as well.
Re: Linking Forms based on criteria [message #641271 is a reply to message #641268] Wed, 12 August 2015 10:07 Go to previous messageGo to next message
ORA2015
Messages: 49
Registered: March 2015
Member
ok. i am sort of new to this so you may be right.
I will need to do some more research and see how i can work it.
I understand what you are saying but i may need to see an actual example to see how it would work. The explantion in forms is and what you gave is not sufficient for me to proceed.
Thanks again
Re: Linking Forms based on criteria [message #641272 is a reply to message #641271] Wed, 12 August 2015 12:21 Go to previous message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
Quote:
ok. i am sort of new to this so you may be right.

CM is completely correct! Forms does not have the ability to actively communicate between two separate Forms modules. You can pass values from 1 form to another through the use of Parameter objects that CM mentioned, or you can use Global Variables in place of parameters, but I strongly discourage the use of Globals unless you know what you are doing.

For the kind of interaction you are talking about, I would recommend you use two data blocks in same form and have each block assigned to a separate Canvas and Window so you can have them both open at the same time. Through this method, you can actively communicate between the two blocks.

Craig...
Previous Topic: view based datablock
Next Topic: FORM DATA
Goto Forum:
  


Current Time: Fri Apr 19 22:05:46 CDT 2024