Helper.TestListItem Method (WorkflowContext, String, 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, _
listIdOrName As String, _
listItem As SPItemKey, _
fieldName As String, _
comparison As String, _
value As Object _
) As Boolean
'Usage
Dim context As WorkflowContext
Dim listIdOrName As String
Dim listItem As SPItemKey
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,
SPItemKey listItem,
string fieldName,
string comparison,
Object value
)
Parameters
context
Type: Microsoft.SharePoint.WorkflowActions.WorkflowContextA workflow context that contains properties that are associated with the active workflow instance.
listIdOrName
Type: System.StringThe GUID or display name 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.