commit_form is not working in Called Form [message #641655] |
Thu, 20 August 2015 00:07 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/ef451c4c4042845d5e95985c1dc25362?s=64&d=mm&r=g) |
malya
Messages: 22 Registered: August 2015 Location: Hyderabad, India
|
Junior Member |
|
|
I am calling a form using call_form('form_name',no_hide,do_replace,no_query_only,PL_ID) where PL_ID has parameters to pass on to called form from calling form. Calling form in query mode, called form in changed mode.
I want to call form and modify the field and come back to calling form but commit_form is not working in called form.
Please help. Thanks in advance.
|
|
|
|
|
|
|
Re: commit_form is not working in Called Form [message #641685 is a reply to message #641681] |
Thu, 20 August 2015 04:25 ![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 |
|
|
And that'll be why it's not working.
Transactions belong to sessions not individual forms.
So if you commit in form B it would force a commit in form A.
However I'm pretty sure from memory that in the case where there are open transactions in A forms simply doesn't allow commit in B.
You could make B start in a new session, in which case you could commit, but then you've got the problem of how to see the modified data in A.
You would have to execute_query to get the changed data and forms would force you to issue a commit before you do that.
So again - make it modifiable in A
|
|
|
Re: commit_form is not working in Called Form [message #641690 is a reply to message #641685] |
Thu, 20 August 2015 04:51 ![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 |
|
|
Having just checked the docs:
If you have a form with outstanding changes and call another form then the called form runs in post-only mode. It can post data to the DB but not commit. When you come back to the caller and issue a commit there that will commit the changes from the called form.
|
|
|
|
Re: commit_form is not working in Called Form [message #641692 is a reply to message #641691] |
Thu, 20 August 2015 05:08 ![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 |
|
|
Well since open_form is to allow you to run multiple forms simultaneously the caller can't possibly wait for you to close the called form before it caries on processing. So that go_block and execute_query are run straight away before you have a chance to do anything in form B.
I would assume you close form B permanently the same way you would if you'd used call_form - click on the close window button. If that doesn't work then pass, I've never used open_form and aren't in a position to test it.
|
|
|
|
Re: commit_form is not working in Called Form [message #641804 is a reply to message #641695] |
Mon, 24 August 2015 11:29 ![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 |
|
|
Check the Forms Help on the 2 built-ins to see the difference between them and why you would use one over the other. The Open_Form() built-in is used when you have a multi-form application. The Call_Form() built-in is designed for the type of thing you are doing - calling another Form that the original Form needs input from. Both Forms are visible at the same time, but the "Calling Form" halts processing while the "Called Form" is open. Once the "Called" form exits, processing will continue in the "Calling" form.
Craig...
|
|
|