Share via


Helper.TestListItem method (WorkflowContext, Guid, Int32, String, String, Object)

Compares a SharePoint Foundation list item field value to a specified value when the list GUID is known.

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

Syntax

'Declaration
Public Shared Function TestListItem ( _
    context As WorkflowContext, _
    listId As Guid, _
    listItem As Integer, _
    fieldName As String, _
    comparison As String, _
    value As Object _
) As Boolean
'Usage
Dim context As WorkflowContext
Dim listId As Guid
Dim listItem As Integer
Dim fieldName As String
Dim comparison As String
Dim value As Object
Dim returnValue As Boolean

returnValue = Helper.TestListItem(context, _
    listId, listItem, fieldName, comparison, _
    value)
public static bool TestListItem(
    WorkflowContext context,
    Guid listId,
    int listItem,
    string fieldName,
    string comparison,
    Object value
)

Parameters

  • listId
    Type: System.Guid

    A string that represents the GUID of the SharePoint Foundation list. May also be the display name of the list.

  • listItem
    Type: System.Int32

    An integer that represents the SharePoint Foundation list item in a specified list.

  • fieldName
    Type: System.String

    A string that contains the name of the field in the list that you want to retrieve for comparison.

  • comparison
    Type: System.String

    A string that represents a comparison operator.

  • value
    Type: System.Object

    An object that contains the value to compare with the value found in the specified field.

Return value

Type: System.Boolean
true if value matches that found in the specified field; otherwise, the value is false.

See also

Reference

Helper class

Helper members

TestListItem overload

Microsoft.SharePoint.WorkflowActions namespace