Lookup to another list using current item ID

Copper Contributor

Hi there

 

I am building a list, where I want to protect certain columns from editing by the users. I understood that Sharepoint does not have column protection functionality. One of the workarounds is to have the columns that I want to protect in another list. 

 

So, I built 2 lists:

- List A (actually a document library): editable by users

- List B: not editable by others

 

In List B, one of the column is the ID in List A.

How do I add List B's columns into List A? I tried creating a lookup column in List A. But, I have to manually select the ID. There is a chance that the users may select the wrong ID. Is there any way I can lookup to the columns in List B using the ID of List A's items?

 

Another question, if in List B, I have multiple entries for 1 item in List A, how do I retrieve the value of the last entry that matches?

 

Thanks. 

2 Replies
So how are the values getting into list B if they don’t have access to the list?

The only way you’ll be able to really do this is create a powerapp for viewing the files and metadata which you can tie to the list and preform lookups your the other list based on the selected ID in list a.

@xhn123456 

I do this all the time. Give the users read only access to List B. Create a look up in List A and use whatever field you need for the users to choose from as the drop down. Usually it's the Title field (or whatever you've called it) but it could be any form of text field. You can use a calculated field if the output is text. I use this frequently to concatenate multiple fields into one drop down, like "Customer Name - Project Number" as a form of data validation where any given customer might have multiple projects. In these cases, I usually bring both values into List A as separate fields.

 

In List A, user can select "Customer Name - Project Number" in the form - default form works fine - but in the list columns, they see Customer Name and Project Number as separate fields. Voila!