View only Authored Documents

I would like to have a common view where as a user can only view the documents that they have authored not everybody’s elses documents.

Subject: View only Authored Documents

Whther or not you can do this in a shared view depends entirely upon whether or not users can EVER see documents created/authored by other people. You cannot effectively base document selection on the current user in a shared view, so that leaves you with two options:

  1. use Readers fields to keep users from seeing anything other than theior own documents; or

  2. categorize the view on the authors’ names and display only the user’s own category using an embedded view or @SetViewInfo.

Subject: RE: View only Authored Documents

Interesting.This question has come up in countless projects and the only way I’ve successfully accomplished this was using one or the other of Stan’s suggestions.

It’s nice to know (find out) that I haven’t been missing something all along.

Thanks Much Stan…

Subject: RE: View only Authored Documents

What is a Sort Action Button?

Here is text from Lotus Help on @SetViewInfo:

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.

Subject: RE: View only Authored Documents

Wording problems only – they expected that you would create an action (Create->Action) named “Sort” and use the code in the example.

Subject: RE: View only Authored Documents

I have tried this but I cannot get it to work.

Subject: RE: View only Authored Documents

You have tried what? We can’t help you with code unless you post what you have tried (paste the actual code) and describe what happens (rather than simply saying it doesn’t work). Is there an error message? What is the error message?

Subject: RE: View only Authored Documents

Sorry -

I have created a view called by Author. My first column is titled Author it is categorized ascending. The formula for this column is @Name([CN];From) where From is a hidden computed when composed field on the form with the value of @Username. In my By Author view I have created an action named Sort with thhe following formula - @SetViewInfo([SetViewFilter];@Name([CN];@UserName);“Author”;1). Everybody can see my authored documents.

Subject: RE: View only Authored Documents

Are you sure that “Author” is the programmatic name of the column? (The programmatic name is on the “beanie” tab of the column properties. If the value you find there is “$X”, then change it to something like “View_Common_From”, and use that value in your @SetViewInfo formula.)

Subject: RE: View only Authored Documents

I got it to work when I put the action in the Action Menu. I do not want people to even see other authors documents and have to click “Sort” to hide them. Is there a way to make this work when the view is opened?

Subject: RE: View only Authored Documents

If there is a security issue here, and users must not be allowed to see others’ documents, then single-category views and setviewinfo are not correct solutions, since they secure nothing. If this is the case, you must use Readers fields, as Stan mentioned in his first post in this thread,

Subject: RE: View only Authored Documents

I would thank all of you that replied to my post. I tried to get the @SetViewInfo to work but was somewhat successful. I did get the readers fields to work in my one view. I have one more question:

Will this affect all my views in the same way?

Subject: RE: View only Authored Documents

Yes. Readers fields control document access absolutely.

Subject: View only Authored Documents

Take a look into Readers fields. They prevent anyone other than specified people from seeing documents in the database.