• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

View by employee Name

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!
1 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)

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,
kali958Author Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now