2

I would like to add a lookup column in a SP list, which allows the user to select a specific library (rather than an item within that library).

Is this possible?

Many thanks

3 Answers 3

1

You cannot create a lookup for a "List name" in SharePoint.

Possible alternatives would be creating a choice column which has a list of values, or customizing the new item page (using JS link) to fetch a set of lists inside current web and display them in a drop-down.

1
  • Thank you, this is a good alternative as I just want to display the library name as a text field (i.e. do nothing further with it) as Ankit Kumar also suggests below.
    – Ian329
    Apr 26, 2016 at 10:16
0

You can take the following approach:

  1. Create a list (let's call it the Master list) with a single Title column (or more if required).
  2. Create an event receiver which would handle ListAdded event. Develop your event receiver so that every time a list (or a library) is added to the web site a corresponding item is added to the Master list - for example the name of the list/library.
  3. Add a lookup column to your second list and configure it to get items from your Master list.

That way you will have a lookup (dropdown) column with the names of the lists on your site.

0

And then do what? Are you going to call that list items afterwards? Please elaborate your requirement.

If you just want the list/library names in a look up field you can create a separate SharePoint list with all List Library names in a column and then call it as a lookup value.

Your Answer

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

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