0

Thank you for reading

I want to create a filtered view based on another list.

I plan to have a list with the location of users, and a list where users have to answer a questionnaire. I want the questionnaire list to show the questionnaire and answers for the user's country only.

I guess I can query the "User list" to detect the [me] user and select only the country, but I don't know who to do it. Could you help?

Thank you

Leonel

3
  • you can use SharePoint list view web part connection functionality, check this link for webpart connection mssqltips.com/sqlservertip/3814/… Commented Sep 20, 2019 at 9:06
  • Is your questionnaire list a survey list or custom list? Commented Sep 20, 2019 at 10:22
  • Thank you, it's a custom list. Commented Sep 20, 2019 at 11:28

1 Answer 1

0

Here is the solution for you. Completely OOTB. Follow the steps below.

  1. You have 2 lists. In below example I have 2 lists - Clients & Projects. Columns in Clients list -> Title (Contains User's email address - must be single line), City

Columns in Projects list -> Title, Lookup to Title in Projects (which is User email id and along with it City is selected as extended column). Add your data in it and you will get your mapping.

enter image description here

enter image description here

  1. Create a WEB PART PAGE. Add list views of both these lists on the page. Add 1 more web part -> Current User Filter (Under Filters section). This web part gives you properties of the user who visits the page. Configure web part properties as shown below. enter image description here

User Principal Name will have the EMAIL ID of the user (if entered in the AD).

  1. Now, connect this web part to Clients list (list containing user details and city). User Web Part -> Title (column containing email id in the list)

  2. You will now see a single row in the clients list view on the page which will be current user's details. Now you have current user's city column and in projects list view on the page you have the city column extended from lookup. So, you can connect these 2 fields by using web part connection from Clients -> send data to Projects list -> select city columns in both the lists.

  3. The projects list will be filtered on the city of the current user.

Here is the result. You can hide the clients list view web part. And only projects list will be viewed on the page.

enter image description here

If this is the solution then PLEASE UPVOTE AND MARK AS ANSWER. It will help others who land on this question.

1
  • Can you please upvote and mark this as answer if it helped you? Commented Sep 24, 2019 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.