Sharepoint LookUp field on Choice field?
Asked Answered
K

4

14

How to create a lookup field for the Choice field..For eg: In a list i have Choice field and i have to create an lookup column in other list pointing to this choice field ..When i select this list this column is not appearing in the dropdown...Please let me know if there is any Limitation for that

Kestrel answered 23/9, 2011 at 5:53 Comment(0)
S
13

It is not possible to create a lookup field for a choice (dropdown) field. There are two ways to resolve your problem: The programmatic approach and the workaround.

The programmatic approach involves an creating event receiver to do the magic - pretty work intensive. But there is an explanation here:

You can also just create another list, containing your choice field values and use a calculated field as a source for your lookup column. Check out the following explanation:

Synecology answered 23/9, 2011 at 11:5 Comment(0)
T
3

the programmatical Solution is at risk to run into an endless recursion:

The ItemAdded Event and UpdatedEvents are asynchrone. This means, that the command: this.EventFireingEnabled = false is not threadsafe. After systemUpdate you set EventFireingEnabled to true.

But because the ItemUpdated is asynchronus, you cannot guarantee, that the ItemUpdated for your system.update has already been called at this time!.

Twoup answered 19/10, 2011 at 15:59 Comment(0)
F
3

You can use calculated column is source list, that will display value of Choice column. Then you can add lookup column for this calculated field. It will work only for Choice column with single selection. For multiple selection you can use 3rd party components like that: http://www.sparqube.com/SharePoint-Lookup-Column

Felid answered 9/2, 2013 at 16:58 Comment(0)
E
-1

It works out of the box for me... but the lookup option is is only available if you go to "List Settings" and click on "Create Column" here is how I configured my column on sharepoint online (in 2019) and it works perfectly... this is copy and pasted from the list settings screen under this column...

Column name: Equipment List 
The type of information in this column is: Lookup 
Get information from: Equipment Master List 
In this column: "Equipment Name" (dropdown selector of all the column names on the other list)
Allow multiple values (to be selected)  [TICKED]

there are some notes lower down too..

Relationship A lookup column establishes a relationship between list items in this list and related items in the target list. Specify the relationship behavior enforced by this lookup column when a list item in the target list is deleted.

When an item in the target list is deleted, cascade delete will delete all related items in this list. Restrict delete will prevent the deletion of an item in the target list if it has one or more related items in this list.

Enforce relationship behavior [CHECKBOX]

radio buttions:
  Restrict delete
  Cascade delete
Epistrophe answered 24/6, 2019 at 3:24 Comment(2)
In my experience, the Columns that appear for selection in the In this column field do not include Choice columns. Was Equipment Name a choice column?Urogenital
I don't see choice columns through the list settings entry point eitherBoiled

© 2022 - 2024 — McMap. All rights reserved.