LookupVirtualCode Method for LCField

This method checks if a specific VirtualCode has been set for a field. Virtual codes flag fields as special system properties recognized by different systems. Refer to the connector documentation for specific codes supported by each connection.

Defined In

LCField

Syntax

Flag = field.LookupVirtualCode (virtualCode)

Parameters

Parameter

Description

virtualCode

The virtual code to look for on the list of codes for this field.

Return Value

Value

Description

Flag

Boolean. TRUE if this virtual code is set for the field; FALSE otherwise.

Example

Option Public
Uselsx "*lsxlc"  
Sub Initialize
  Dim session As New LCSession
     ' In an HEI Scripted Agent, use the following syntax instead:
     ' Dim session As New LCSession ("mySession")
  Dim field As New LCField (LCTYPE_INT)
  Dim Code As Long
  Call session.ListConnector (LCLIST_FIRST, , Code)
  Call field.SetVirtualCode (Code)
  While session.ListConnector (LCLIST_NEXT, , Code)
    Call field.SetVirtualCode (Code)
  Wend
  If (field.LookupVirtualCode (&H10000)) Then
    Print "The field has virtual code 10000h set."
  Else
    Print "The field does not have virtual code 10000h set."
  End If
End Sub

Example Output

The field has virtual code 10000h set.