?
Solved

Open View for selected documents

Posted on 2003-03-13
10
Medium Priority
?
208 Views
Last Modified: 2013-12-18
Hi all

Do anyone know how I can solve this problem??

I need a View action which open a view and only display selected documents.

I use the command @Command([OpenView]; "Average"), in an agent, but I cann't choose the option selected documents due to it's not legal option for @Commands

Thank in advance

Sanne
0
Comment
Question by:sondermark
[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
  • 3
  • +1
10 Comments
 
LVL 9

Expert Comment

by:Arunkumar
ID: 8127437
How do you select documents first of all ???

Okay here is an option, you are in a view and you select documents from it and if you would like to view only these selected documents alone then what you can do is, to create a folder and transfer thse selected documents to it and open the folder with the same command as open view.

Its easy.  Use @Command([Folder]) to move selected documents to folder and use @command([openView]) to open the folder.

-Arun.
PS: if you are looking for something else let us know.
0
 
LVL 13

Expert Comment

by:CRAK
ID: 8131260
Use a folder instead of a view:
copy the selected doc's to a folder, open it and later remove the doc's again!
0
 

Author Comment

by:sondermark
ID: 8134719
Hi again

This is the commands i tried to use:

@Command([RemoveFromFolder];"Average1");
@Command( [Folder] ; "Average1" ; "0");
@Command([OpenView]; "Average1")

- I would like to emty the folder Average1 without
  select any documents - simply emty the folder.
- Then when I select som documents from a view it should
  be copied to the folder Average1
- After that it should display the folder Average1


I cann't get it work with the command above - is there something wrong in these commands??

Thanks in advance

Kind regards

Sanne
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 13

Expert Comment

by:CRAK
ID: 8139722
Sorry Arun, only now I notice that I've copied your suggestion...
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 8139838
Thats okay CRAK. Thats how you get to understand how stealing works !

:)
0
 
LVL 7

Expert Comment

by:scottrma
ID: 8143770
Put this code in an agent set to run "Manually from the Actions Menu" on "Selected Documents":

Dim ws As New NotesUIWorkspace
Dim s As New NotesSession
Dim uidb As NotesUIDatabase
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim coll As NotesDocumentCollection

Set uidb = ws.CurrentDatabase
Set db = uidb.Database
Set view = db.GetView("Average1")
Set doc = view.GetFirstDocument

While Not (doc Is Nothing)
     Call doc.RemoveFromFolder("Average1")
     Call view.Refresh
     Set doc = view.GetFirstDocument
Wend

'The Average1 folder should now be empty

Set coll = db.UnprocessedDocuments
Set doc = coll.GetFirstDocument

While Not (doc Is Nothing)
     Call doc.PutInFolder("Average1")
     Set doc = coll.GetNextDocument(doc)
Wend

'All eligible documents should now be in the Average1 folder

Call uidb.OpenView("Average1")
Call ws.ViewRefresh

Regards,

Scott
0
 
LVL 7

Accepted Solution

by:
scottrma earned 200 total points
ID: 8143795
Sorry, try this one instead:

Dim ws As New NotesUIWorkspace
Dim s As New NotesSession
Dim uidb As NotesUIDatabase
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim coll As NotesDocumentCollection

Set uidb = ws.CurrentDatabase
Set db = uidb.Database
Set view = db.GetView("Average1")
Set doc = view.GetFirstDocument

While Not (doc Is Nothing)
    Call doc.RemoveFromFolder("Average1")
    Call view.Refresh
    Set doc = view.GetFirstDocument
Wend

'The Average1 folder should now be empty

Set db = s.CurrentDatabase
Set coll = db.UnprocessedDocuments
Set doc = coll.GetFirstDocument

While Not (doc Is Nothing)
    Call doc.PutInFolder("Average1")
    Set doc = coll.GetNextDocument(doc)
Wend

'All eligible documents should now be in the Average1 folder

Call uidb.OpenView("Average1")
Call ws.ViewRefresh

The only difference here is that I added the line:

Set db = s.CurrentDatabase

because I am not sure if the NotesDatabase.UnprocessedDocuments property returns anything if you got the handle to NotesDatabase through the NotesUIDatabase.Database property.

Regards,

Scott
0
 
LVL 13

Expert Comment

by:CRAK
ID: 8151712
Talking about stealing Arun.....
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 8151727
Yes!  New guys are experts I accept.  And especially Scottrma...

:-)
0
 
LVL 7

Expert Comment

by:scottrma
ID: 8153251
:-)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

777 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