Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering Views

Status
Not open for further replies.

fugazi1968

Technical User
Jun 24, 2002
21
GB
Hi all :)

I have a bit of a problem that I hope you'll be able to help with.

I am writing an application in notes to handle our company holiday bookings. Nothing spectacular but I am having a problem with a particular view.

The view needs to show 1 form type and only those for the user currently logged on. So in the View Selection I have entered

SELECT Employee=@Name([CN];@UserName) & Form="HolidayReq"

Unfortunately when other people look at the view, it shows my details not theirs. I'm not sure whats going on here, any ideas?

Thanks

John.
 
There is something you do not know : you cannot make a document filter with a view.
When you put @Username in your selection formula, and test it on your machine, it works because it is your client that is evaluating the formula.
When you save the view, it is the server that is evaluating the formula. Therefor, @Username will return the name of the server. Since servers do not create documents, there is no doc in the view.
You have two choices here : create an embedded view in a document, and have users open that, or learn about Reader and Author fields and how to implement them.

Which one do we talk about first ?

Pascal.
 
Thanks for the feedback Pascal,

I have got round the views issue by opening them in a slightly different way.

Instead of using a named item in the outline I used a command which seems to be working

@Command( [OpenFrameset] ; "main");
@SetTargetFrame("body");
@Command([OpenView];"History");
@SetViewInfo([SetViewFilter];@Name([CN];@UserName);"Employee";1)

Would love to sort out the reader and author fields, that would make like alot easier, are there any tutorials you could recommend? Embedding the view would be handy too, I'll no doubt need to do that before too long.

Many thanks

John.
 
I've just posted a FAQ on Reader/Author fields.
When it is available, I'll give you the link here.
As for embedde views, it is really easy. All you need is a view catgorized by something (ie user name), and a form with an embedded view that points to the view in question. In the form, set the Category value of the embedded view to the content you need (ie user name), and only those docs will show up.
Hope this helps !

Pascal.
 
Thanks for the Help Pascal, getting down to document level authority would really help me out.

John
 
Okay, you can find my FAQ here : faq73-5664

I hope this will help you.

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top