How to filter list values based on current user profile? UserContextFilter Web Part
Posted by zieglers on February 17, 2009
In this article I’ll try to show you how to use UserContextFilter web part. UserContextFilter web part can be used in situations where you’d like to filter other web parts based on a property value of the current user. Mostly this filter criterion is current user id. However, in some cases one may need to use any of the user profile property values such as Title, Department, and Email … etc.
For this article I chose a simple scenario: We’ll add a Tasks web part and by using UserContextFilter web part only tasks assigned to current user will be shown.
Here are the details:
- 1. Create a Team Site and delete all web parts on default.aspx page.

- 2. Add Tasks web part.

- 3. Add Current User Filter WP.

This web part is only viewable in edit mode, and it needs to be configured prior to use.

- 4. Add a connection to Tasks web part.

- 5. Select “Assigned To” as Consumer Field Name and click “Finish”.


- 6. Test UserContextFilter web part.
- a. Create a test user called “testuser“

- b. Assign this user to the test site’s visitors group.


- c. Before signing in as testuser, create a sample task for this user.

- d. Now sign in as test user. Tasks web part, which is being filtered by UserContextFilter web part, should be displaying testuser’s tasks as follows.


zieglers
This entry was posted on February 17, 2009 at 4:14 pm and is filed under IT Stuff, SharePoint. Tagged: current user, filter, list values, moss, sharepoint, Tasks, UserContextFilter. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


Simon ten Kate said
On my site i can’t find or add the the Current user filter, it’s not there, not even in Site settings in the webpart Gallery where you can add new webparts that weren’t available. (Maybe I don’t recognize it). I use Sharepoint 2007, is it possible that this webpart (or any filter webparts) are not available in my installation?
adele adkins naked said
adele adkins naked…
[...]How to filter list values based on current user profile? UserContextFilter Web Part « Zieglers[...]…
idesigns said
idesigns…
[...]How to filter list values based on current user profile? UserContextFilter Web Part « Zieglers[...]…