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
context
Type: Microsoft.SharePoint.WorkflowActions.WorkflowContextA WorkflowContext object that represents a workflow context.
listIdOrName
Type: System.StringA string that represents the GUID of the SharePoint Foundation list identifier (ID) or the display name of the list.
listItem
Type: System.Int32An integer that represents the SharePoint Foundation list item in a specified list.
fieldName
Type: System.StringA string that contains the name of the field in the list that you want to retrieve for comparison.
comparison
Type: System.StringA string that represents a comparison operator.
value
Type: System.ObjectAn 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.