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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with view restriction.

Status
Not open for further replies.

gamesman

Programmer
Oct 8, 2001
223
0
0
US
This is one of those so simple I'm missing it questions.

I have a form called requests. It includes an Authors field set to Compute when Composed with a default value of @v3username.

Now I'm attempting to create a view called "My Requests". It should only show the documents that the user has authored.

I have been unalbe to get this to work correctly. The view shows either all documents or no documents depending upon code.
Setting View selection to AUTHOR = @Username or =@V3Username in a select @if does not work.

Any suggestions or ideas as to what I'm missing.

Thanks.
 
Try not using the @If in your select statement. If author is a field name, just use Select Author = @UserName. I believe an @If is out of place in a view selection formula. That may be hanging you up!! This kind of selection formula may slow the view opening quite a bit.
 
I meant to explain that I've used it with and without the @if function. If I use it without the @if, then everyone see's the form that was first seen by a viewer logging in.
In otherwords, user1 has a form and logs in and uses the view. They will see their form just the way they should. Anybody else that accesses the view will also see user1's form, instead of their own.

And you can use @If with Select. It's one time when you don't have to provide 2 and 3 arguments.
 
You can get weird results like those you describe, if you try to create a personalised view which is also shared. When you first created the view, did you select "Shared: Private on first use"? This stores a copy of the view on the client, with the formula set when the private view is created. If you modify the view design, your client will create a new (additional) private view, so you'll need to delete the previous one. You'll also find that if another Notes user uses that client, they will see the private view previously created - giving unexpected results if it is meant to display according to user name. The only fix I know to this, is to delete the database icon from the workspace and then re-open the DB. I hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top