I have a need to display content from a list in another site collection on every users My Site page - About Me (/person.aspx).

The list is essentially responsibilities for users. So the list needs to be filtered by the particular my site owner it is being displayed on. So if anyone navigated to Alex's my site it would display all that he is responsible for. NOTE: this is different to being filtered by the current user.

Can I use a Content by Search web part to look at the list, pass a parameter (user name?), and then filter the two Person/Group columns (one is single-value, the other is multi-value) by that user name parameter to return the results I need? I have already set up my list in question with managed properties.

Would I need to use REST calls instead and then display the data using a template?

  • Yes, you can use CSWP. Write a search query or make a result source to display appropriate data in your webpart. Then format it with display template. It would be more appropriate if you let us know your exact requirement. – ateet May 10 '15 at 18:05
  • OK so the list I am trying to display has these columns: Title - Text; Description - Text; Owners - Person/Group (Multi); Deputy - Person/Group (Single); Group - Lookup; So I'd like to return all columns where Owners or Deputy matches <My site owner> grouped by Group. I tried this with the CSWP but couldn't get it to filter by the two Person/Group types, returned no results. – user20414 May 10 '15 at 18:18
  • Can you post your query? – ateet May 10 '15 at 18:31
  • This is my query: path:"/sites/lists/responsibilities/" (IsDocument:"True" OR contentclass:"STS_ListItem") ResponsibilityOf-Responsibilities:{User.Name}. So that last piece 'ResponsibilityOf.....' is the managed property of that particular column within my list (Multi Person/Group). The 'Path' and 'Keyword Filter - Items' work fine, I get results returned. It's only when I add the last bit of the query, to filter that column by current user, it fails. This is not the end goal though. – user20414 May 11 '15 at 14:12
  • I need to filter that column by the owner of the my site that the Search web part is being displayed on. So if I was looking at your 'My Site' the query should be 'ResponsibilityOf-Responsibilities:{Ateet}'. When looking at someone else's my site the URL ends '/Person.aspx?accountname=xxx%5CabcJohn'. Can I pass 'xxx%5CabcJohn' to the query and have it match against 'ResponsibilityOf' or 'Deputy' (secondary single-value person/group). Thus returning only those entries in the column ResponsibilityOf that match 'xxx\\abcJohn'. Hope that makes sense. – user20414 May 11 '15 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.