Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

return to form that is already open

Posted on 2001-08-21
11
Medium Priority
?
1,907 Views
Last Modified: 2010-08-05
If a form is already open I want to return to this form not open the same form again. Below is how I tried to do this but it does not work.

IF ID_NULL(FIND_FORM('FORM1')) THEN
   OPEN_FORM('FORM1');
ELSE
   GO_FORM('FORM1');
END IF;
0
Comment
Question by:maryeb
11 Comments
 
LVL 4

Accepted Solution

by:
jtrifts earned 400 total points
ID: 6409320
It depends on how you've navigated to the form you're in, in the first place.  Consider that there are three ways to invoke a form:
OPEN_FORM
CALL_FORM
NEW_FORM.

If you have got to FORM2 by invoking a call_form('FORM2'), then you are effectively creating a call stack.  I.E.
FORM1--> FORM2--> FORM3-->...FORMnn.

Implemented this way, a close_form for the current form (or indeed an exit_form) will send you back to the next form on the stack.  Then you don't have to specify what form you want to return to at all.

One of the things that this highlights is that design is important.  The flow of work and the way users are intended to proceed through the forms is important.

The call_form for example, though it will create a handy call stack, will also disable the other forms until the current form is dismissed, returning you to the previous form on the stack.

NEW_FORM will let you replace one form with another, while OPEN_FORM let's you open one after the other again ad again, often letting you open multiple instances of the same form.
another thing to think about is whther or not the work done in the next form is necessarily part of the same transaction.  If not, you do have the option of opening forms in different sessions (and hence different transactions)...but I digress...

SO back to your specific question:

the use of go_form is correct, however I suspect you are referencing the FMX name rather than the form name...

GO_FORM(form_name);  Here FORM_NAME is the name of the target form.  The data type of name is VARCHAR2. NOTE: The GO_FORM built-in attempts to search for the form module name, not the name of the .fmx file. (Check in the object navigator to see if the form label (which defaults to MODULE1 for newly created forms) is the same as the name you are passing...

JT
0
 

Author Comment

by:maryeb
ID: 6409961
Yes, I had GO_FORM(form name of the .fmx file);
It works fine with GO_FORM(module name);

BUT,

I have a search form, where the user enters a pid and data is displayed on this form relating to that pid. Then the user clicks the button More, if they want to see further information about this pid. This brings the user to another form that displays further information.

Now if the user returns back to the search screen and enters a different pid I want the user to be able to see further information on this pid if they wish, but I can't do this as with the code below I am asking it to go to the form if it is already open. If I remove this code (GO_FORM('FORM2');) and the user enters the same pid into the search form for the second time a new form will be opened displaying information relating to this pid. Therefore two forms will be opened with the exact same data, I want it to go to the form if the pid is the same.

IF ID_NULL(FIND_FORM('FORM2')) THEN
 OPEN_FORM('FORM2');
ELSE
 GO_FORM('FORM2');
END IF;

Is there another way around this problem.

0
 
LVL 4

Expert Comment

by:jtrifts
ID: 6410002
OK.  Let me see if I have this straight.

Form1 = search form.
Form2 = results form.

Run Form 1. Enter query detail (PID). Press Search Button.
IF FORM2 already open with same PID, go to the FORM2.
IF FORM2 NOT OPEN or FORM 2 is open but PID is different, open a new instance of FORM2.

Is this what your requirements are?

IF so, I'll post a follow-up...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:maryeb
ID: 6410082
Yes
0
 

Author Comment

by:maryeb
ID: 6421561
JT,

The above comment is what I am looking for........any update.
0
 
LVL 4

Expert Comment

by:jtrifts
ID: 6421825
Sorry Mary...have been busy...I'm not certain...

And you haven't yet told me why you're so keen on keeping this as a two form approach...especially when most think that this might be an inappropriate design...

I'll try to ge tback to you when I can, but am swamped with other things at the mo...

Regards,

JT
0
 

Author Comment

by:maryeb
ID: 6421931
I now have

Form1 where I enter my search criteria(PID), then my search data relating to this criteria is displayed on the same form(Form1).

In Form1 I may have a number of records displayed. So now to see even more information relating to the PID entered I have a button called MORE which opens a new form(Form2) with additional information.

This is why I still need a solution to the above.
0
 
LVL 4

Expert Comment

by:jtrifts
ID: 6421948
This could still be done within the same form either on another canvas, or within another window...
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7042751
Please update and finalize this old, open question. Please:

1) Award points ... if you need Moderator assistance to split points, comment here with details please or advise us in Community Support with a zero point question and this question link.
2) Ask us to delete it if it has no value to you or others
3) Ask for a refund so that we can move it to our PAQ at zero points if it did not help you but may help others.

EXPERT INPUT WITH CLOSING RECOMMENDATIONS IS APPRECIATED IF ASKER DOES NOT RESPOND.

Thanks,

** Mindphaser - Community Support Moderator **

P.S.  Click your Member Profile, choose View Question History to go through all your open and locked questions to update them.
0
 
LVL 4

Expert Comment

by:jtrifts
ID: 7047011
either points to jtrifts or delete the question.
JT
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7058164
Thanks, JT, points clearly to you. :)
Moondancer - EE Moderator
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example, show how to take different types of Oracle backups using RMAN.
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question