Solved

"Select All" problem in embedded view

Posted on 2006-06-14
11
641 Views
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?
0
Comment
Question by:Leepingtang
  • 6
  • 5
11 Comments
 
LVL 18

Accepted Solution

by:
marilyng earned 125 total points
Comment Utility
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.
0
 

Author Comment

by:Leepingtang
Comment Utility
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?

Lp
0
 
LVL 18

Expert Comment

by:marilyng
Comment Utility
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)

http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/e2a31b9d2a77f41685256b260050b64d?OpenDocument&Highlight=0,excel

Good examples of excel exports.
0
 

Author Comment

by:Leepingtang
Comment Utility
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!
0
 
LVL 18

Expert Comment

by:marilyng
Comment Utility
Not really impossible, just needing a creative work around, that's all.  Did you need help with the view action button?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:Leepingtang
Comment Utility
Actually yes i do Marilyn. I have tried using formulas and keyboard shortcuts. No luck still.
0
 
LVL 18

Expert Comment

by:marilyng
Comment Utility
Ok, tell me what you want to do, you want to select all documents to do what?  
0
 

Author Comment

by:Leepingtang
Comment Utility
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.
0
 
LVL 18

Expert Comment

by:marilyng
Comment Utility
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)
wend

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. ;)
0
 

Author Comment

by:Leepingtang
Comment Utility
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!
0
 
LVL 18

Expert Comment

by:marilyng
Comment Utility
Not tested, wrote it on the fly.. so, fingers crossed, too!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

15 Experts available now in Live!

Get 1:1 Help Now