Skip to main content
OCLC Support

AddFieldLine

Find the syntax, use, parameters, return values, and an example for the AddFieldLine macro command in Connexion client.
Syntax BOOL = CS.AddFieldLine (nLineNumber, sData)
Use to Add a variable field to the current record in a specific field position specified by line number, with each field representing one line.
Parameters
  • For nLineNumber, enter the field position (line number) where you want the new field inserted.
  • For sData, enter the data you want to add to the 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.AddFieldLine 1, “500 Field added at line position 1”

     If CS.AddFieldLine(3, “500 Field added at line position 3”) = True Then
          MsgBox “New field successfully added”
     End If

     CS AddFieldLine 999, “500 Field added as last line of record”
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 field 500 as the first line of the record–that is, as the first variable field–with no indicators (two spaces between the tag number 500 and the text). Adds the text Field added at line position 1 to the new field. No confirmation message.
  • Adds a new field 500 as the third line of the record with no indicators and the text Field added at line position 3. If the field is added, returns the message: New field successfully added.
  • Adds a new field 500 at the end of the record with no indicators and the text Field added as last line of record. No confirmation message.