Home » Developer & Programmer » Forms » question on call form
question on call form [message #83491] Thu, 16 October 2003 18:10 Go to next message
Venkat
Messages: 110
Registered: February 2001
Senior Member
We are having two forms A & B developped in Forms9i and want to call
form-B from form-A on some button.

We are using callform to call Form-B from a From-A. We are using
following lines of codes to call Form-B from Form-A like this:
callform(no_hide,no_replace,no_query_only,pl_ID);

When we used commit_form at Form-B, we were getting oracle message
"Calling form has unapplied changes..". & it was not committing.

To avoid this oracle message, we modified the call form codes like this:

:system.message_level:=5;
POST;
:system.message_level:=25;
callform(no_hide,no_replace,no_query_only,pl_ID);

This has suppressed the above message, But, when we do commit_form in
Form-B, the entire session gets committed i.e. the data available on
Form-A also gets committed alongwith the data available on Form-B to the
database, even if user does clear_form(no_validate) in Form-A. (That
is, he is not interested in saving records now).

I checked the Oracle Docs. & it treats entire called forms with-in one
run-form session with POST command and if i do commit_form on called
form, entire session gets committed. But, i want if user on Main form
Form-A does clear_form, the sesion should not gets committed i.e. it
should work like clear_form(no_validate). I tried with
clear_form(no_commit, full_rollback) but it could not be used.

Also just to add to this, if any sort of any commit is issued at Form-B
like, forms_ddl(commit) or commit, It is always committing the entire
session of forms. (both A & B).

How we can we restrict the changes to Form-A. Any possible workaround
please for this.
Re: question on call form [message #83492 is a reply to message #83491] Fri, 17 October 2003 01:22 Go to previous message
Maaher
Messages: 7064
Registered: December 2001
Senior Member
So, you have 2 Forms A and B. A will be called from B. But the 2 form modules share the session. What you want is the following:

1. Form A must be running its own session.
2. Form A must be modal (i.e. you cannot navigate to Form B without closing Form A)

This can be accomplished using OPEN_FORM instead of CALL_FORM. The first has the option to create a new session while the latter will always use the same session.
Try this:
OPEN_FORM('A',ACTIVATE,SESSION);

Now we have met the first requirement (own session for Form A).

Open Form A in the Forms Builder and set the "MODAL" property of the WINDOW to 'YES'. That way the OPEN_FORM will act like a CALL_FORM and you have your own session in every form.

HTH,
MHE
Previous Topic: commit form problem
Next Topic: call_form
Goto Forum:
  


Current Time: Sat Aug 13 02:13:01 CDT 2022