AMT Help Files

COM Field Interface

The AMT Field object is returned by one of the following AMT COM connection functions: GetFieldByIndex, GetFieldByName, or GetDisplayField.

The following functionality is provided:

Properties

Name Type Access Description
CopyFrom Boolean Read-only Determines whether the field is part of a copy-from section.
DecimalPlaces Integer Read-only Number of decimals (if field type is Numeric) or "0" (otherwise).
FieldLength Integer Read-only Length of the field.
FieldType String Read-only Type of field. Possible values are N, +, -, C, or A (numeric or alphanumeric).
FormattedValue String Read/Write The Value of the field, presented as a formatted String.
MemoryValue String Read/Write The Value of the field, presented as a MemoryBuffer.
Name String Read-only

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

ReadOnly Boolean Read-only Indicates whether the field is read-only and cannot be modified.
UpperCase Boolean Read-only Returns if the field is in uppercase.
Value String Read/Write Value of the field, returned as a string.
Visible Boolean Read-only Returns if the field is visible.
X Integer Read-only X-position of the screen.
Y Integer Read-only Y-position of the screen.

Example

PowerShell

# Create an object for 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()

Contents