Helper.TestListItem Method (WorkflowContext, Guid, SPItemKey, String, String, Object)
Verifies whether the specified value matches the value of the field found in the specified list item of the specified list.
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 SPItemKey, _
fieldName As String, _
comparison As String, _
value As Object _
) As Boolean
'Usage
Dim context As WorkflowContext
Dim listId As Guid
Dim listItem As SPItemKey
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,
SPItemKey listItem,
string fieldName,
string comparison,
Object value
)
Parameters
context
Type: Microsoft.SharePoint.WorkflowActions.WorkflowContextThe workflow context contains properties that are associated with the active workflow instance.
listId
Type: System.GuidThe GUID of the list.
listItem
Type: Microsoft.SharePoint.Workflow.SPItemKeyThe list item in the specified list.
fieldName
Type: System.StringThe name of the field for the specified list item in the specified list from which to retrieve the value.
comparison
Type: System.StringA comparison operator.
value
Type: System.ObjectA value to compare with the value found in the specified field.
Return Value
Type: System.Boolean
true if the specified value matches the value of the field found in the specified list item of the specified list; otherwise, false.
Remarks
This method verifies whether the specified value matches the value of the field found in the specified list item of the specified list.