Partilhar via


Helper.LookupBool Method (WorkflowContext, Guid, SPItemKey, String)

Retrieves the Boolean value of a field for the specified item in the specified list.

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

Syntax

'Declaration
Public Shared Function LookupBool ( _
    context As WorkflowContext, _
    listId As Guid, _
    listItem As SPItemKey, _
    fieldName As String _
) As Boolean
'Usage
Dim context As WorkflowContext
Dim listId As Guid
Dim listItem As SPItemKey
Dim fieldName As String
Dim returnValue As Boolean

returnValue = Helper.LookupBool(context, _
    listId, listItem, fieldName)
public static bool LookupBool(
    WorkflowContext context,
    Guid listId,
    SPItemKey listItem,
    string fieldName
)

Parameters

  • fieldName
    Type: System.String

    The name of the field of the item in the list from which to retrieve the value.

Return Value

Type: System.Boolean
true or false value that is retrieved from the specified field of the specified list item.

Remarks

This method gets the Boolean value of the specified field for the specified item in the list.

This method returns false if the field cannot be found in the list item or an exception is encountered while attempting to convert the value of the field to a Boolean value.

See Also

Reference

Helper Class

Helper Members

LookupBool Overload

Microsoft.SharePoint.WorkflowActions Namespace