Skip to main content
OCLC Support

DeleteField

Find the syntax, use, parameters, return values, and an example for the DeleteField macro command in Connexion client.
Syntax BOOL = CS.DeleteField (sTag, nInstance)
Use to Delete a field by specific tag number and, in the case of repeated variable fields, by order of appearance among the other fields with the same tag number.

Same as using the command Edit > Cut Copy Paste > Delete Field.
Parameters
  • For sTag, enter the tag of the field you want to delete.
  • For nInstance, enter a number to specify which instance of a repeated field you want to delete. For example, enter 2 to delete the second instance of the repeated field.
Return values TRUE if the action is successful, or FALSE if not.
Example Sub Main()

     Dim CS As Object
     Set CS = GetObject(,“Connex.Client”)

     If CS.IsOnline = False Then
          CS.Logon ““, ““, ““
     End If

     CS.Search “WC”, “#1”

     CS.DeleteField “700”, 2

     If CS.DeleteField(“700”, 1) = True Then
          MsgBox “700 field successfully deleted”
     End If
End Sub

What this example does
  • Logs on to Connexion if not already logged on, using the default authorization and password you selected in Tools > Options > Authorizations tab.
  • Searches WorldCat for record number 1.
  • Deletes the second instance of field 700. No confirmation message.
  • Deletes the first instance of field 700 and, if successful, returns the confirmation message: 700 field successfully deleted.