How to add a web-part or other object to a page which has information only relevant to the logged-in user?
Wednesday, March 09, 2011 5:05 PM
To clarify the title of this message, I have a set of CQWPs which show various incarnations of a site list filtered by different metadata.
I want something similar for the currently logged-in user, but am unsure what the correct route to take is.
user logs into site
3 lists show up
- the two which are different filters of the site list
- one which is a list of items the user has specified, either on his MySite, or on the current site itself (either one)
Thanks for any input.
Wednesday, March 09, 2011 6:03 PM
If you have SharePoint 2010 server, you can use audiences to display content on a page and change user change content. Almost always you will see audicences at the bottom of the web parts settings section. You will also need to create a audience for each user. Here is alink for creation of audiences.
Gary Newman MCSE, MCT, CCNA MCDBA, MCAD, MCSA MCTS SharePoint 2007 Dev & Admin MCPD SharePoint 2010 Development
Wednesday, March 09, 2011 6:47 PM
That answer was fairly helpful but I do not think it fits in this situation in that it sounds fairly complex. Is there no way to add a reference to a list that will display only content that the user has contributed, and/or allowing them to add further items? The way you mentioned sounds like I would have to personally create 100 lists and 100 audiences and show or hide each one depending on the user who was logged in, given 100 users in the system...
Wednesday, March 09, 2011 7:02 PM
In a list view you can filter so that either created/modified is equal to [Me] (currently logged in user). This will give relevant information from that list to the user.
This filtering does not really work with the CQWP however. You could do a custom CQWP template if you want, or do a data view web part with an spdatasource with that same filter on it however using sharepoint designer.
SharePoint 2010 Extensions - http://sp2010ext.codeplex.com/ My Blog - http://www.withinsharepoint.com Twitter - http://twitter.com/#!/withnsharepoint
- Marked As Answer by M_Olson Thursday, March 10, 2011 9:16 PM
Thursday, March 10, 2011 9:16 PM
Thank you for that information, it was extremely helpful. I had not thought such a thing was available out of the box (I should have looked) but it is!
In fact, I was even able to get it going with the CQWP. Initial testing shows that it is working just fine with a value of [Me] for the CreatedBy filter.