Skip to main content
OCLC Support

SetFieldLine

Find the syntax, use, parameters, return values, and an example for the SetFieldLine macro command in Connexion client.
Syntax BOOL = CS.SetFieldLine (nLineNumber, sData)
Use to Add a field or add data to an existing field in a field position specified by line number, with each field representing one line.
Parameters
  • For nLineNumber, enter the field position (line number) of the field to which you want to add data.
  • For sData, enter the data you want to add: Type the three-character field number, followed by two one-character indicators (or use 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.SetFieldLine “1”, “500    New first line

     If CS.SetFieldLine(10, “500 New 10th line”) = True Then
          MsgBox “Line 10 changed”
     End If

     If CS.SetFieldLine(10, “500 New last line in record”) = True Then
          MsgBox “New last line 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 field 500 as the first field (line) in the record, with no indicators (two spaces between tag number and text) and the text: New first line.
  • Adds a new field 500 as the tenth field in the record, with no indicators and the text: New 10th line. If the action is successful, returns the message: Line 10 changed.
  • Adds a new field 500 as the last line of the record, with no indicators and the text: New last line in record. If the line is added successfully, returns the message: New last line added.