0

I have a small problem that i am facing currently in SharePoint Online.
I have two list Employees & Projects and i have created cascading dropdown. When the employee selects its name from employee lookup column he gets to see all his projects in the projects Lookup column. Now the issue that i am facing is that in the lookup i only want to show the logged in employee name so hat he cannot select other users name and fill their entry.
is this possible, if yes please do help me.
Thank You.

  • You need to pre-filter the employee field using a Current User Filter. You then connect this to the Projects list web-part and hid the Employee field from the current view. They will then not be able to see the other employees but will see their projects. Note: this assumes that your employee list is generated from an Active Directory (i.e. the user accounts that drive SharePoint access and permissions). – unibod50 May 16 '18 at 7:32
  • Actually Employee column which contains the name is a lookup column which pulls data from a single line text box – jayant khushalani May 16 '18 at 8:23
  • Then I'm afraid that you are a bit stuck. The only way a SharePoint page can identify who is viewing the page is via the Current User Filter. To make use of this it has to have a field that uses the Person/Group field type. So your Employee column must be of this type if you want to be able to restrict the view of Projects based on who is looking at the page. I have done something like this myself just recently. – unibod50 May 16 '18 at 8:40
  • okay but then how do i populate , projects field according to the user logged in. Is it possible we can talk about this because i am really stuck ! – jayant khushalani May 16 '18 at 8:46
0

This requires a slight redesign in how you have set up your lists. The first thing you need to do is change your Employee list so that the Employee column is a Person/Group field and Show the field Name.

enter image description here

Or you could even just add the Employee field directly into the Project list. This depends on what other uses you have for the Employee list.

For simplicity I will assume you have added the Employee Person/Group field directly to the Project list.

  • You now need to set up the page to view the projects. Insert the Project list as a web-part and adjust the view to show the columns the way you want to.
  • Next insert a Current User Filter enter image description here
  • Edit the Webpart and set the Connections to Sen Filter Values To the Projects webpart enter image description here
  • Set the Consumer Field to Employee

Now when the page is opened the user will only be able to see the Projects where the Employee field equals the current user.

  • this sounds like a solution but me being a fool did not tell you one thing that my Employee and Projects are being used in Time Tracker list. so currently i want to do this in a new form , where the employee gets populated or even entered and the projects gets populated automatically. – jayant khushalani May 16 '18 at 9:41

Your Answer

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

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