Linking Forms based on criteria [message #641259] |
Wed, 12 August 2015 08:24 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/a92697b52861a89df6383c55b6d305a6?s=64&d=mm&r=g) |
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 #641263 is a reply to message #641262] |
Wed, 12 August 2015 08:32 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 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 #641266 is a reply to message #641264] |
Wed, 12 August 2015 08:47 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
ORA2015 wrote on Wed, 12 August 2015 14:35I 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 #641268 is a reply to message #641267] |
Wed, 12 August 2015 08:55 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 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 #641272 is a reply to message #641271] |
Wed, 12 August 2015 12:21 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](//www.gravatar.com/avatar/6f539f43889b4b3e3fcb6c591073de8f?s=64&d=mm&r=g) |
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...
|
|
|