Solved

View to display documents by the current user.

Posted on 2006-10-19
11
638 Views
Last Modified: 2013-12-18
reference answer: http://www.experts-exchange.com/Applications/Email/Lotus_Notes_Domino/Q_20568247.html?query=lotus+view+current+user&clearTAFilter=true

I have been trying to create a view to show the documents created by the current user accessing the view. I thought I found it in the question referenced above.

Here are the details:

1. I created a view with the View Type option set to "Shared, Private on first use."
2. The selection criteria is set to: SELECT (@Name([CN]; Author) = @Name([CN];@UserName))

It appeared to work fine, but I have a couple of reservations.

This is what is in help on "Shared, Private on first use.":

****
Shared, private-on-first-use views
A "Shared, private-on-first-use" view begins as a shared view and becomes a private view as soon as a user accesses and saves the view. These views give you a convenient way to distribute personal views to multiple users. You usually create this type of view by using @UserName to customize the display for each user.
Note that this is the only way to make a view work with @username, because the view selection is only parsed when the view is generated. Thus, if Tom opened a shared view that keyed to @username, all of Tom's documents would display. But, if the view is still open when Jay accesses it, Jay sees all of Tom's documents, and does not see his own. So, to avoid this conflict, designate the view as "Shared, private on first use" when using @username in the selection formula.
After a user saves a shared-to-private view, the user's copy of the view no longer inherits design changes. For example, if you add a column to the view, anyone using a private version of the view won't see the new column. To obtain design changes, users must delete their private versions of the view and open the shared-to-private view again.
Shared-to-private views are not a security measure, as they do not protect data. If you create a shared-to-private view that omits certain documents, a user can still create a private view that includes them.
Shared-to-private views are stored in the database as long as they are shared. After the first use, Domino uses the "Create personal folders/views" option to determine where to store the view.

***

As it says above, a new view and view index are created for each user, however, the problem is that the new views are set to not refresh and from what I can see, the design and data is only viewable by the user they are created for. As a Manager, I cannot go and force a new design down, I cannot flush views so they can be recreated, I cannot clean them up, I cannot set them to refresh design, since I cannot even se them, etc. etc.

The only work around that I see is that if I made a design change to the view, I would have to rename it, update all code that pointed to it, people accessing it would create all new private views the next time the accessed the view, but the old views would still be setting out there taking up space. The only way I know of to remove an old personal view would be to have the person it was created for to go in and delete it. Not exactly an efficient answer.

Anyway, if any of you very bright people out there has an answer to this, I would appreciate it.
0
Comment
Question by:NormCox
  • 5
  • 4
  • 2
11 Comments
 
LVL 43

Assisted Solution

by:Steve Knight
Steve Knight earned 125 total points
ID: 17769313
One other way is to have a form with an embedded view.  The first column of the view is @username and is sorted and catergorised.  You can make an embedded view show just a single category so enter the formula there of @Username too.  No they can just see their own docs.

Steve
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17769325
Sorry, for form read Page.
Steve
0
 
LVL 1

Author Comment

by:NormCox
ID: 17769341
This is a viable solution. The main drawback is that the user is unable to click on column headings to sort. Are there alternatives that allow me to have my cake and eat it, too? ; )
0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 125 total points
ID: 17769427
Buy two cakes  :-))

You're right about the column sorting, but... you can also specify that clicking on the column header will move to a different view. I know, p.i.t.a., you have to create more views and pages than strictly necessary, but that's the price you pay for two cakes.
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17769644
Er I've got views embedded in pages in an R5 system here and the column headings show and you can click on them to sort as long as you add the additional sort orders.  Haven't tried the functionality out in R6 or R7 specifically so may have changed??

Steve
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 17769809
AFAIK, if you enabled Show single category, and you click a column, ALL documents will be visible because there's no category any more.
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17769924
Erm, yes. true... checked it on a none single-category embedded view.

Crawls back into hole.

Haven't done any development on R7 yet, anything on there that would help?

Steve
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 17770537
Haven't found it (yet)...
0
 
LVL 1

Author Comment

by:NormCox
ID: 17777321
I finally got this. I forgot to add that I am programming in 6. In 6, there is a new command called  @SetViewInfo. You add this on the line after your OpenView Command. I categorized the first column of the view by author, named the column Author and then used the line: @SetViewInfo([SetViewFilter];@Name([CN];@UserName);"Author";1)

It opens the view and displays all the docs that the current user authored, I have full view functions and I do not have to mess with private view indices.

I am having my cake and eating it too.

One side effect, if you use this to open another view in the database, once this view is opened, the database attempts to try and use this line when opening up all other views, so you have to add the line after all OpenView commands with the first column of the view and an empty string to override the original.

Hopefully, this all makes sense because I am on my out the door for the weekend.

I don't think I can give myself points so I will split them evenly between sjef & dragon, not they need them since they are point baziollinaires anyway.

Thanks for the help and Go Cards!!!
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 17777891
Cheers for that, bit worrying really isn't  it - I'm certified as an advanced developer in r6 (pclp as was) but haven't touched dev except r5 for a year or so due to customers still using that ver.... will have to update some of the old dbs with new functions like this once I can before I forget any more of it!  
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 17779047
Hey thanks!

I toyed with @SetViewInfo (of course :-$ ) and I noticed an irritating behaviour of the Notes client: right before the call, the whole view was visible, just for an instant, and when @SetViewInfo kicked in, only the one category was displayed. So I decided to place it in the functions archive under Nice; Who knows; Perhaps; Maybe; Must review in R7. It's here, somewhere, under a thick layer of dust...

I think I'm certified, but definitely not as R6 CLP... :-))
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
LOtus Notes 6.5 low performance 13 31
DAOS - Backup / Restore 2 170
All incoming messages are coming as read 3 28
IBM Lotus notes 9 81
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…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
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.

757 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

17 Experts available now in Live!

Get 1:1 Help Now