Share via


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

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

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

Syntax

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

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

Parameters

  • listIdOrName
    Type: System.String

    A string that represents the GUID of the SharePoint Foundation list identifier (ID) or 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