0

i have a SharePoint list called “HR”, it lists our employees and all personal information about them. On this list, I want to display whether the employee have borrowed any equipment home from the company.

The items that the employees borrow are stored in another SharePoint list called "Borrowed Equipment". It contains several yes/no boxes for each borrowed equipment and a text field for any comments.

Now, when an employee leaves the company, i want a list of borrowed equipment to display on the HR list, under the employees list element.

Is this possible in any way?.

  • How are the lists related already? Does the "Borrowed Equipment" have a lookup column to the "HR" list? – willman Jan 21 at 14:32
  • Also, which version of SharePoint are using, on-premises or online, modern or classic? – willman Jan 21 at 14:44
  • It's SharePoint Online Modern view, and the lists are not related in advance. – user2492871 Jan 23 at 9:29
0

You have to create the Lookup columns in the HR List, Select source list as Borrowed Equipment and select the fields that you want to show in HR List

| improve this answer | |
  • I've tried that, but the field is blank, even though i check the other list and confirmed that it contains data. I'm thinking that i need to tell the Lookup, that it needs to get the data from the same emplyee on the other list?. Or have i misunderstood what the Lookup feature is supposed to do?. – user2492871 Jan 23 at 10:16
  • @user2492871 - Lookup column is just like Primary and foreign key concept. It should pull the data from your Parent list if your Primary key matches with the Destination List (Foreign key). – Shahul Hameed Jan 23 at 16:55
0

In order to create a relationship between the two lists, you would need to add a Lookup column from one to the other.

Which list you choose to put the lookup column on could be a matter of debate, however, I would suggest adding a Lookup column on the "Borrowed Equipment" list pointing to "HR". In general, when choosing the direction of the lookup, if you have a one-to-many relationship, in most cases you will want to put the Lookup column on the list that is on the "many" side of that relationship, pointing to the "one", or in other words, the child records point to the parent.

So, if you add the Lookup to your "Borrowed Equipment", then whenever someone adds a new Borrowed Item, they effectively get an Employee choice list sourced from the connected "HR" list. If you already have a text field for employee name or something in HR, you should remove that and just use the lookup column.

Once that relationship is configured, you can create a new "grouped view" in your "Borrowed Equipment" list that groups by the HR Lookup column. Thus giving your users a quick way to see what any given employee has borrowed.

| improve this answer | |

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.