SetNumeric Method for LCField

This method sets the value of the field to a specified LCNumeric value. If the field is not of type LCTYPE_NUMERIC, Notes® tries to convert the value to the field's type. If this fails, error LCFAIL_INVALID_CONVERT will occur.

The data type of the field will not change from this operation -- only the field's value.

Defined In

LCField

Syntax

Call thisField.SetNumeric(index, srcNumeric)

Parameters

Parameter

Description

index

Long, >= 1. Index of the value to be assigned.

srcNumeric

LCNumeric. Value to be assigned to the field data value.

Example

Option Public
Uselsx "*lsxlc"  
Sub Initialize
  Dim field As New LCField (LCTYPE_TEXT)
  Dim number As New LCNumeric
  number.value = 1234567890.12345678
  Call field.SetNumeric (1, number)
  Print "The field's value is " & field.text(0)
End Sub

Example Output

The field's value is 1234567890.12346.