[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


"Select All" problem in embedded view

Posted on 2006-06-14
Medium Priority
Last Modified: 2013-12-18
I am having problem using Ctrl + A / Edit -> Select All/ Using formulas to select all documents in an embedded view on a form. Because the number of records in the view is big having the select all function is crucial. Have any expert here faced this problem before?
Question by:Leepingtang
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
  • 6
  • 5
LVL 18

Accepted Solution

marilyng earned 500 total points
ID: 16908445
What are you trying to achieve? The embedded view is going to be less functional in this respect, and you may have to resort to an agent/button.

Author Comment

ID: 16908507
Hi marilyn,

The purpose of the select all is to reduce the work load required to select the thousands of records to be exported to excel. Thanks. I have tried creating a button with formulas but it wouldn't work. You suggest scripts will work?

LVL 18

Expert Comment

ID: 16908597
Well, the embedded view is going to be hard to get a handle on.  If you're just searching for a way to export the entire view to excel, then it can be done with some caution.

Thousands of documents take a bit of time, in a network environment where the users are in the same building as the server, or on a GIGe line, then the thousands of documents process quickly.  Over a WAN, ugh.

I had such an application running  a large, accounting report of several thousand lines, formatted, etc.  Over LAN, quick. Over WAN.. start Friday night and maybe it will be done the next day.  The solution was to replicate a copy of the database to the other city, or export to csv or xml.

At any rate.  Back to your problem.   The problem that you will have with the embedded view is that the form takes the focus, so you can't identify selected documents in the view.

If you just want to export all the documents in the view, and you already know the view name, then that's not a problem.  YOu can adjust any script to do this.  

Exporting selected will be a problem, and one way to do this is to embed the actions on the view action bar:  select these, move to folder, and then export all the documents in that folder.  This will take some creative @Formulas and calling some Notes Agents.  (run agent to clear documents in the folder, get selected and move to folder, run agent to export all documents in that folder to excel)


Good examples of excel exports.
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

ID: 16932661
Well, its another "no" i suppose. Everyday i am finding a new "impossible" for Lotus Note. Great FUN!
Will allocate the points to you as you are the only one who replied. Thanks Marilyn!
LVL 18

Expert Comment

ID: 16933277
Not really impossible, just needing a creative work around, that's all.  Did you need help with the view action button?

Author Comment

ID: 16966387
Actually yes i do Marilyn. I have tried using formulas and keyboard shortcuts. No luck still.
LVL 18

Expert Comment

ID: 16968255
Ok, tell me what you want to do, you want to select all documents to do what?  

Author Comment

ID: 16989575
I have already created an exoprtr function that worked fine, marilyn. The thing is the documents are incrementing horribly to nearly 10,000+ already, selecting individually wouldn't be efficient. The view has to be embedded as it is categorised to a single category. It would be nice if there can be a button that will select all the documents.
LVL 18

Expert Comment

ID: 16989899
Ok, on the embedded view, you have a handle on the "Category" right?  You also know the view name, right?

So, you don't need to select all the documents, you need a button that will export the "category" from the "view" and then export those documents.

Since you have to use script to do the export, just make sure that your form has a category field, and the "viewname" field.

your "Export all button" can be on the form, and doesn't need to be on the view, since you have a handle on the FORM.

Dim session as New NotesSession
Dim db as NotesDatabase
Dim ws as New NotesUIWorkspace
Dim uidoc as notesUIDocument
Dim doc as NotesDocument
set db = session.currentdatabase
set uidoc = uidoc.currentdocument
set doc = uidoc.document
'Now you have a handle on the OPEN form
Dim viewname as string
Dim categoryname as string
dim collection as NotesDocumentCollection
Dim view as NotesView
viewname = doc.getItemValue("YourViewNameField")(0)
if viewname ="" then
    msgbox "Sorry, the lookup view is not defined..",,"Unable to Continue"
    exit sub
end if
set view = db.getView(viewname)
if view is nothing then
   msgbox "Sorry, unable to locate: " + viewname,,"Unable to Continue"
   exit sub
end if
categoryname = doc.getItemValue("YourCategoryField")(0)
if categoryname = "" then
   msgbox "Sorry, unable to locate the category",,"Unable to continue"
   exit sub
end if
'Now see if you have any documents matching the category
set collection = view.getalldocumentsbykey(categoryname, true)
if collection.count <1 then
   msgbox "Sorry, there were no documents in " + viewname + " view matching this key: " + categoryname,,"No Matching documents"
   exit sub
end if

'Now you have a collection of documents identified - same thing as select all.  :)

Dim exportdoc as NotesDocument
set exportdoc = collection.getfirstdocument
while not exportdoc is nothing]
   'do you export here based on each document
    'Get the next document in the collection
    set exportdoc = collection.getnextdocument(exportdoc)

if not collection is nothing then set collection = nothing

'Do the rest of your cleanup stuff... remember to release the memory and close excel.

Simple.  You gave up too soon. ;)

Author Comment

ID: 16989959
Yes marilyn, i gave up too soon indeed. I have just started playing with domino a month ago so i think i will need your help a LOT in the future!
I am going to try the code right now. fingers crossed, you are my life saviour! ( if it works ) haha!
LVL 18

Expert Comment

ID: 16997436
Not tested, wrote it on the fly.. so, fingers crossed, too!

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
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 Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

650 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