Export (0) Print
Expand All

SPFieldLookup.PrependId property

Gets or sets a Boolean value that specifies whether to add item IDs to the beginning of items listed in selection boxes on forms.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

'Declaration
Public Property PrependId As Boolean
	Get
	Set
'Usage
Dim instance As SPFieldLookup
Dim value As Boolean

value = instance.PrependId

instance.PrependId = value

Property value

Type: System.Boolean
true to add item IDs to items; otherwise, false.

ExceptionCondition
SPException

Either the AllowMultipleValues property returns false or the LookupField property points to the ID field in the target list.

The PrependId property is intended for use with multivalue Lookup fields. Set the property to true to cause each of the field's values to render on New and Edit forms in the format "ID - Value", where ID is the value of the target item's ID field and Value is the value of the field in the target item that is identified by the Lookup field's LookupField property.

Show:
© 2014 Microsoft