[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Saving and Closing doc while opening another

Posted on 2005-05-03
10
Medium Priority
?
272 Views
Last Modified: 2013-12-18
Hello experts,
I don't know if this has been asked before by me or anyone else, but when you are pressed for time, sometimes you can't go searching. I have been struggling with formula code to allow me to save a document and then trigger opening another document in another database while the first is closing. I am running 5.0.11.  Any solution or insight would be appreciated.
0
Comment
Question by:schmad01
  • 5
  • 5
10 Comments
 
LVL 14

Expert Comment

by:p_partha
ID: 13921207
IN the queryclose of the form, just give

@Command([FileOpenDatabase];"Development":"PROBLEMS.NSF")

 (see the help for the syntax)

Partha
0
 

Author Comment

by:schmad01
ID: 13921609
Yes, that will work, but I need it only to happen if the document is in edit mode and FIELD1 is "Approved".
0
 
LVL 14

Expert Comment

by:p_partha
ID: 13921627
Give this in Queryclose

@if(!@isdocbeingedited & field1 <>"Approved";@return("");@success)
@Command([FileOpenDatabase];"Development":"PROBLEMS.NSF")
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:schmad01
ID: 13926496
Ok, that works. I still need to refine it though.  Here is the real code as I have it now:

@If(!@IsDocBeingEdited & status_a !="Approved";@Return("");@IsDocBeingEdited & status_a !="Approved";@Return("");
!@IsDocBeingEdited & status_a ="Approved";@Return("");@Success);
@Command([FileOpenDatabase];"USOWN001":"PUBLIC\\Ques\\Corporate\\QUES9603.NSF")

The last scenario to add is this and I'm not sure how to do it.  

The first time when the document is Approved, it will bring up the QUES9603.nsf on closing which is correct.
However, there will be times when I will have to go back into the document and edit another field. Now, after doing that the QUES9603.nsf will open again upon closing. I only want it to open on the first time the document is approved.  Is that possible?
0
 
LVL 14

Expert Comment

by:p_partha
ID: 13926514
When the first time the document is approved , set one more field (like flagapproved = true), then check for it in your formula

partha
0
 

Author Comment

by:schmad01
ID: 13926577
Not sure how that would be different from checking just the Approved field upon closing.
0
 
LVL 14

Accepted Solution

by:
p_partha earned 1000 total points
ID: 13926639
For instance, you can use i n queryopen:

field flagtoopenornot:=@if(status_a="Approved";"no";"yes");

and in teh queryclose just add this:

@if (flagtoopenornot="no";@return(""));
@If(!@IsDocBeingEdited & status_a !="Approved";@Return("");@IsDocBeingEdited & status_a !="Approved";@Return("");
!@IsDocBeingEdited & status_a ="Approved";@Return("");@Success);
@Command([FileOpenDatabase];"USOWN001":"PUBLIC\\Ques\\Corporate\\QUES9603.NSF")
0
 

Author Comment

by:schmad01
ID: 13926870
Did not work in queryopen, but it did in Postopen.
0
 

Author Comment

by:schmad01
ID: 13926882
Thanks alot partha!!!
0
 
LVL 14

Expert Comment

by:p_partha
ID: 13926884
Thanks for the points

- Partha
0

Featured Post

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!

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
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 a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Screencast - Getting to Know the Pipeline

834 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