共用方式為


FieldLookup.PrimaryFieldId 屬性

取得或設定值,指定的主要查閱欄位識別碼這是相關的查閱欄位否則而是空字串。

命名空間:  Microsoft.SharePoint.Client
組件:   Microsoft.SharePoint.Client.Silverlight (在 Microsoft.SharePoint.Client.Silverlight.dll 中);  Microsoft.SharePoint.Client.Phone (在 Microsoft.SharePoint.Client.Phone.dll 中)  Microsoft.SharePoint.Client (在 Microsoft.SharePoint.Client.dll 中)

語法

'宣告
Public Property PrimaryFieldId As String
    Get
    Set
'用途
Dim instance As FieldLookup
Dim value As String

value = instance.PrimaryFieldId

instance.PrimaryFieldId = value
public string PrimaryFieldId { get; set; }

屬性值

類型:System.String
傳回代表主要查閱欄位識別字String執行個體。

例外狀況

例外狀況 條件
[Microsoft.SharePoint.SPException]

有效的 GUID。錯誤碼 ︰-2146232832。

[System.NotSupportedException]

此欄位所屬的清單時外部清單。錯誤碼:-1。

備註

當您建立多個資料行查閱時,[主要] 欄位是FieldLookup物件,建立關聯的來源清單。一或多個第二個欄位取決於來源清單關聯的主索引的欄位。

如果目前的SPFieldLookup物件**IsDependentLookup()**屬性會傳回true,然後目前的物件是第二個欄位,其PrimaryFieldId屬性會傳回介於 GUID 的字串表示的識別依賴的主要查閱欄位。

請參閱

參照

FieldLookup 類別

FieldLookup 成員

Microsoft.SharePoint.Client 命名空間