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.
LVL 13
Andrew DerseIT ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

psv1973Commented:
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.
0
Andrew DerseIT ManagerAuthor Commented:
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.
0
Andrew DerseIT ManagerAuthor Commented:
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?
0
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

psv1973Commented:
I would have two views on one list.

One view would be called "My Steps" and I would set this view to be the default view. Filters as descibed earlier.( in this view you don't need to include the field that contains person's name).

Then keep the Original All Items view which is created when you created the list ( in this view you want to include the field that contains person's name).

You could always create a page which shows first "My Steps" in a list view web part and then a second web part showing all items. ( Simply edit page add web part and select the list in question and select the view under edit web part properties).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
psv1973Commented:
Arer you using a workflow here?
Are you trying to display the documents or the tasks in the workflow?
0
Andrew DerseIT ManagerAuthor Commented:
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.
0
psv1973Commented:
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.




0
Andrew DerseIT ManagerAuthor Commented:
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.
   
   
0
Andrew DerseIT ManagerAuthor Commented:
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.
0
Andrew DerseIT ManagerAuthor Commented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.