Link to home
Start Free TrialLog in
Avatar of Carlos Llanos
Carlos LlanosFlag for United States of America

asked on

Highlight document library rows based on who's logged in.

Hi Experts,

Thanks in advance for your time to read over this post/question.

I would like to know:

1) Is it possible to highlight a document library row based on who's logged into the SharePoint server?  Basically, the user logged in would see all of the documents "assigned" to them highlighted.

2) If this is possible, then could you please provide me with steps or sample code that would get me pointed in the right direction?

Thanks.
Avatar of psv1973
psv1973
Flag of United Kingdom of Great Britain and Northern Ireland image

You could either

1. Add a dataview web part to a page using SharePoint Designer. In this web part you can configure the colours used depending on the data of each item in your list/library.

2. Have you considered creating a view where you filter on Author=[Me] or Modified=[Me]. Then make this view the default.
Avatar of Carlos Llanos

ASKER

Thanks for the info.

#2 is definitely what I was considering however, I need to filter based on a process step.  

Here's a little more detail:

When a user logs into SharePoint and navigate to the Documents Library, the documents are sorted by the "Process Step" that they are in.

Each user in the system is assigned to a "Process Step".

When a user logs in, I would like them to be able to just see their documents...is there a filter that I can set to filter out all documents that don't relate to their step?

Also, how would I be able to have them view all of the documents if they wanted to?  Sorry, I'm very new to SharePoint.

Thanks for your time.
To further clarify, each user is in it's unique SharePoint Group that has access to a "Process Step" in the system.

I would like to know how to filter by telling the system to show documents that are in my "Process Step".  Is that possible?
ASKER CERTIFIED SOLUTION
Avatar of psv1973
psv1973
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Arer you using a workflow here?
Are you trying to display the documents or the tasks in the workflow?
I am using a workflow and I just need to display the documents.  There are no tasks.

The workflow is a VERY basic workflow that just checks to see who last modified the document and then sends an email to the next person in line.

So if person-x modifies the document and then puts it in Process Step #1, person-y gets an email.

They now wanted to highlight the rows for person-y when they logged into the system to show all of person-y's documents that are "assigned" to them based on their process step.

So if person-y is assigned to the Process Step #1, and they logged in, they wanted their files to be highlighted...but the modified by name is going to be person-x's name.

Hope this makes sense.
Ok, now we're getting there.

So in your workflow are you setting a field to the person-y (this can also bea group, that doesn't really make too much of a difference). If you are then you could filter on that field and set the filter to WhatEverField=[Me].

If you've got code that looks like this:
if step = step1 then email person-y
Then it might be a bit trckier. Then you could also set a Target Audience on the list item. And enable target audnice on the 'My Steps' View.




The steps look like this:

-----------------------------------------------------------------------------------------------
If Current Item:Process Step equals 0 - Product Management
   
    If Current Item:Modified By equals person-x
    //Nothing here...as we don't want to re-send an email to the person.
   
    Else
        Email 0 - Product Management
-----------------------------------------------------------------------------------------------

Then it proceeds to check for Process Step: 1 - Packaging Engineer...and so forth.
   
   
BTW person-x belongs to 0 - Product Management and person-y belongs to 1 - Packaging Engineer, etc...

Again, thank you so much for your time with this.
This worked for the end user.  We were able to create the two views for them and they lliked this option.

Thanks for your time.