View by employee Name

Posted on 2006-03-30
Last Modified: 2013-12-18
I have 2 database, one is for workflow and one is for attendance. In the attendance database, I have a view that is called My Time, a simple nice little view that will allow associates to see only their time that they have taken off. The formula for the view selection is:

SELECT employeeName=@Name([CN];@UserName) & Form_Name="Time Off" & Status="Approved" & All_Archive="Active"

Now in my second database, I would like to create the same type of view that is My Calls (since the 2nd is a call record database).

I have copied the same formula over and tweaked it to this:

SELECT employeeName=@Name([CN];@UserName) & Form_Name="Call" & Final_Archive="Active"

This does NOT work, what happens is that all the associate can see my actual calls I have logged and not theirs. But if I refresh the documents they all just go away. I do not understand how this can work in one database and not the other. I did not want to make these private views, so they are currently both shared. If anyone has any suggestions that would be fantastic!
Question by:kali958
    LVL 18

    Accepted Solution

    Hi kali958,
    Well, you really can't use a view to select documents for a particular user.  However, you can let the first column sort on @Name([CN];@UserName) , categorized, and then embed the view in a form and set the category  = to a computed for display field on the form that is @Name([CN];@UserName), also, set SaveOptions = "0".  This would not be a security measure, if people have ability to create views, or folders then they can read someone else's time.

    You can also employ readers fields on the forms so that the user's name is included in their associated forms, so when they open the database they can only see their time (preferable, since it enforces security, and conforms to most HR standards about privacy)

    Your reader's field would have to be a concatenation of HR Roles (who should be able to see all times) and the user declared on the form.

    So, on the form you might have one name field for the user's name (canonicalized) and the reader's field that concatenates the name + the HR Role, something like: "[HRUsers]", and the administration role so that the SERVER can see the data, too: "[Admin]".

    You would also need to add an administration server for the database, and set the update Names and Authors & readers fields so that if an employee has a name change, they don't lose their entries.

    Test first on a separate database!  Because you're going to have to run an agent to update all the reader's fields.   If you don't do it correctly, you will end up with an empty database (that is bunches of records you can't see)

    LVL 22

    Expert Comment

    Hi kali958,
    for views that contain @Username the best option is to use "Shared, private-on-first-use views" or "Shared, desktop private-on-first-use views".
    That kind of view is shared and when the user first access it, it is saved (in your db or in the desktop.dsk, that's the difference between two mentioned types) as private view.
    Locate "Private views" - "described" in designer's help index.

    Hope this helps,

    Author Comment

    Thank you so much Marilyng - I think that I am going to do is the embedded view, that makes the most sense. I can control who creates views and such. Thanks again

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    This is an old article, please see an updated version of this article, located here:
    Article by: Rob
    Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now