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!

Create a view that shows only the documents created by an individual

Status
Not open for further replies.

sumgait

Programmer
Jun 14, 2001
21
0
0
CA
I know that this has been probably covered before.

We have a purchase order database. Staff create purchase order requests. On the form I have created a hidden Authors field which stores the name of the author of the document.

I want to create a view - "My Orders and Requests".

This view would ""only"" show the purchase orders created by a specific user - say Mary Smith when she logs on she could click on this view and see "only" the purchase orders created by herself.

So the idea is that this view would always be unique and specific to the user who logged on and wanted to see the purchase orders made by that individual.

I have been playing with a view that shows the creation date, status of order, etc but I can not get it to only display the orders specific to a user.

Any assistance would be helpful.

Thanks again

John Falloon


 
There are a couple of ways to do this. If you don't want other people to read her orders, create a hidden readers field in the document. The field should be an editable field, and have a default value of something like '@USERNAME : "[Debug]" : "ORDER READERS"'

The username would allow the creator to read it. Debug is a role, so that a manager / designer could troubleshoot a problem (this one is important) , ORDER READERS would be a group that is allowed to read all orders. The list can get pretty long.

Alternatively, you could create a hidden field that has the users name in it, and then use that in your view selection. The only thing is, I don't think @username works well in view selection formulas all the time, so you will have to test it out.
 
Hi,
You could create a hidden readers field which is computed when composed that has the users name in it(by using @Username),even if u dont specify anything in your view selection formula , then too only the documents created by that particular user will be displayed.
 
This is what we are using and it works ok.
Your Form Name & Field Names will be different.
Notes Version 4.51a
View Title: My Views\Action Items - Completed
View Selection Formula
SELECT Form = "Action Item" &
ActionStatus = "Completed" &
AccountExec = @Name([CN];@UserName) &
AssocName = ""
When opened first time creates a view on the Hard Drive of the user which is updated each time the view is opened. Has the advantage of being faster if database contains a lot of documents. The AccountExec field on each document contains the name of the person who should see the document. The view itself is unique to the user. If more than one person uses the client, a view for each will be created the first time they open the view.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top