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
context
Type: Microsoft.SharePoint.WorkflowActions.WorkflowContextWorkflowContext object that contains properties that are associated with the active workflow instance.
listId
Type: System.GuidA string that represents the GUID of the SharePoint Foundation list. May also be 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.