Solved

return to form that is already open

Posted on 2001-08-21
11
1,738 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 100 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
 

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that useā€¦
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now