Skip to main content
OCLC Support

AddField

Find the syntax, use, parameters, return values, and an example for the AddField macro command in Connexion client.
Syntax BOOL = CS.AddField (nInstance, sData)
Use to Add a variable field in the current record in correct tag order and specify the order of its appearance among other fields with the same tag number.
Parameters
  • For nInstance, enter a number to specify the order of the new field among other fields with the same tag. For example, enter 2 to insert the new field as the second instance of a repeatable field.
  • For sData, enter the data to put in the new field: Type the three-character field number, followed by two one-character indicators (or substitute spaces if no indicators), followed by the field text. Enclose the data string in quotation marks (“).
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.AddField 2, “245 Second 245 field”

     If CS.AddField(3, “245    Third 245 field”) = True Then
          MsgBox “245 field successfully added”
     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.
  • Adds a new repeatable field 245 as the second instance--that is, following the first instance of field 245--with no indicators (two spaces between the tag number 245 and the text). Adds the text Second 245 field to the new field. No confirmation message.
  • Adds a third instance of field 245 with no indicators and the text: Third 245 field. If the action is successful, returns the confirmation message: 245 field successfully added.