Partilhar via


Helper.FindWithKey Method (WorkflowContext, String, SPItemKey, String, String, String)

Gets the item in the specified list based on the value of the field for the item in the associated list.

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

Syntax

'Declaration
Public Shared Function FindWithKey ( _
    context As WorkflowContext, _
    listIdOrName As String, _
    listItemSPItemKey As SPItemKey, _
    fieldNameInAssociated As String, _
    externalListId As String, _
    fieldNameInExternal As String _
) As SPItemKey
'Usage
Dim context As WorkflowContext
Dim listIdOrName As String
Dim listItemSPItemKey As SPItemKey
Dim fieldNameInAssociated As String
Dim externalListId As String
Dim fieldNameInExternal As String
Dim returnValue As SPItemKey

returnValue = Helper.FindWithKey(context, _
    listIdOrName, listItemSPItemKey, _
    fieldNameInAssociated, externalListId, _
    fieldNameInExternal)
public static SPItemKey FindWithKey(
    WorkflowContext context,
    string listIdOrName,
    SPItemKey listItemSPItemKey,
    string fieldNameInAssociated,
    string externalListId,
    string fieldNameInExternal
)

Parameters

  • listIdOrName
    Type: System.String

    The GUID or display name of the associated list.

  • fieldNameInAssociated
    Type: System.String

    The name of the field for the item specified by listItemSPItemKey.

  • externalListId
    Type: System.String

    The GUID or display name of the list to search for an item with the matching field value.

  • fieldNameInExternal
    Type: System.String

    The name of the field for the item in the list specified by externalListId.

Return Value

Type: Microsoft.SharePoint.Workflow.SPItemKey
The list item found in the specified list.

Remarks

This method gets the value of the field for the item in the associated list, and then searches for an item in the specified list with the same value for the specified field.

See Also

Reference

Helper Class

Helper Members

FindWithKey Overload

Microsoft.SharePoint.WorkflowActions Namespace