AMT Help Files

COM Field Interface

The Lion Field object is returned by one the functions of the Lion COM connection: GetFieldbyIndex, GetfieldbyName, GetRepeatingField or GetDisplayField.

Properties


Name Return type Access Description
CopyFrom 

Boolean

Read  Determines if the field is part of a copyfrom.

DecimalPlaces

Integer

Read

Number of decimals (if field type is Numeric) or "0" (otherwise).

FieldLength

Integer

Read

Length of field.

FieldType

String

Read

Type of field can be: N, +, -, C or A. (Numeric or Alphanumeric).

Name

String

Read

Name of field. If the field is part of a copyfrom, the field name is concatenated with the copyfrom number. For example: “MyField04”.
Underscore characters (_) in the name will be translated to a hyphens (-).

NameOrig String Read

Returns the original and untranslated (underscore to hyphen) name of the field.

ReadOnly

Boolean

Read

Determines if it’s allowed to change the value of the field.

Value

String

Read/Write

Value of field, presented as a String.

X

Integer

Read

X-position of the screen.

Y

Integer

Read

Y-position of the screen.

Example


PowerShell


# Create object of a form field and set a value
$Customer_TelNr = $AMTApp.GetFieldbyName('TEL-NO')
if ($Customer_TelNr.ReadOnly -ne $true) {
    $Customer_TelNr.Value = '+1 867 5309'
}
# Transmit to send the values
$AMTApp.Transmit()