In R5 we couldn’t use the following View Selection Criteria…
SELECT (Form = “My doc”) & (@Contains(Employee;@Name([cn];@UserName)).
Our workaround was to use a form/page with an embedded view.
I was just messing around and this now seems to work. Is this a fluke or a true enhancement? Does anyone know when this feature was added?
Thanks!
Subject: Can @Name now be used in View Selection Criteria?
It’s a fluke - well, if you’re the only person testing it it’ll probably work, but no it doesn’t work in production
Subject: RE: Can @Name now be used in View Selection Criteria?
Grrrrrr!
I thought Lotus finally made this happen! Works great in Development! Could make my life so much easier and my views so much better!
Thanks Dan…
Joe
Subject: Can @Name now be used in View Selection Criteria?
You could always use it, and it would appear to work in testing – until multiple users hit the view at the same time. User 1 indexes in documents he owns, then while he still has the view open, User 2 hits the view and sees both her own and User 1’s. User 3 may see his documents, but then again he may only see User 1 and User 2 for a little while until the view updates again, whereupon some docs will appear and others may magically vanish. Oh, what fun will be had by all.
No, @UserName can only safely be used in private views (including Shared, private on first use).
Subject: Can @Name now be used in View Selection Criteria?
Thanks Everyone for the info and advice…
Much appreciated!
Joe
Subject: Can @Name now be used in View Selection Criteria?
You could try using @SetViewInfo. The example from the help database is similar to what you want
This code, when added to a the Sort action button in a Standard Outline view, filters the contents of the current view to display only those documents that have empolyeeName fields that contain the current user’s name. The view is categorized by employeeName.
@SetViewInfo([SETVIEWFILTER];@Name([CN];@UserName);“employeeName”;1)
I think by puting code in the PostOpen you could achieve something. This thread and a number of others discuss it
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/3ef48ea07e69fd02852574ff00701099?OpenDocument