Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

@Command([FileCloseWindow]); collapsed

Posted on 2004-04-28
10
Medium Priority
?
550 Views
Last Modified: 2013-12-18
Hi,
I used the following code to return to a frameset for a button action
however occasionally after the current form is closed it prompts saying
cannot find the Sales Frameset. Any clues?
Thanks !!

@Command([FileSave]);
@Command([FileCloseWindow]);
@PostedCommand([OpenFrameset];"Sales")
0
Comment
Question by:damoncwk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 19

Expert Comment

by:madheeswar
ID: 10946454
@Command([FileSave]);
@Command([FileCloseWindow]);@PostedCommand([FileOpenDatabase];"vmokshatest/vmokshacert":"Pratima1/oppmgtsys.nsf")

The above will open the database with the frameset (if ur using the Sales frameset when database open.

try the code.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10946499
Did you try this?

@Command([FileSave]);
@Command([OpenFrameset];"Sales");
@PostedCommand([FileCloseWindow]);
0
 

Author Comment

by:damoncwk
ID: 10947159
Hi RanjeerRain,
Yes i did try this but the window of the form is still not closed....
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:madheeswar
ID: 10947487
did u tried mine?
0
 

Author Comment

by:damoncwk
ID: 10947961
madheeswar,
yes i did try yours and it did work
however it still prompt asking if I want to save the changes
is there any way that i can save the file without the app promting the question?
Thanks!!!
0
 

Author Comment

by:damoncwk
ID: 10947981
madheeswar,
the FileCloseWindow command didnt work though though
the frameset is opened.....
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 10948057
create SaveOptions Field and assign 1 as default value. it will stop prompting.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10948104
Try this combi,

@Command([FileSave]);
@PostedCommand([OpenFrameset];"Sales");
@Command([FileCloseWindow]);
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10948355
What version of notes do you have ?

Formula always have exceution priorities...So can you do this in LS ?

~Hemanth
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 375 total points
ID: 10952101
@PostedCommand([FileSave]);
@PostedCommand([FileCloseWindow]);
@PostedCommand([WindowWorkspace]);
@PostedCommand([AddDatabase]; @DbName);
@PostedCommand([OpenFrameset]; "Sales");

Explanation:

Your code relies on knowing what will be on screen as each command is executed.  It assumes that after the FileSave, the window will still beopen, but closable.  After the FileCloseWindow, it assumes the database will be on screen... some view or frameset.  Usually that's true.  Then, when teh OpenFrameSet executes, it opens the Sales frame of the database that is currently on screen, which again is usually the same database.

But, let's say while the form was on screen, the user opened mail, then clicked back to the tab containing your form.  After the file close window, mail is on screen, so it tries to open a Sales framset in mail.  That won't work.

In addition, there are some funky things with FileCloseWindow... Notes delays executing the FCW until the other commands have finished.  So, it will actually open the frameset before closing teh form, then just close the form.

The latter problem is worked around by making ALL the commands work like FCW, using PostedCommand instead of @Command.  FCW is always treated as FCW, but the other can also be made to do the same.

As to the "which window is open" problem, all you need to do is make sure your database is active on screen before opening the framset.  the above works, though if your users do not normally use the workspace, it will leave a workspace window open.  You can work around that by, insted of going to workspace to force active DB, instead, open a temp view in your DB, open frameset, open the same temp view window, and close it.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

730 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