LUA object: datafield

The object represents a field present within a record of a specific table in the database. In scripts that intercept a change to a field (on a form or a table), the datafield object is created automatically and refers to the changed field.

AvailabilityThe object is available only in specific execution contexts, or is created by a function provided by other objects
Pre-initialized inValue being edited on data form, Value changed on data form, Value changed in a data table row cell

getvalue

DescriptionRetrieves the value saved inside the field
Value Typeobject
Formatobject = datafield.getvalue()
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
NotesIf a column name that does not exist is entered, the method returns an empty string
Examples
value = datafield.getvalue()

name

DescriptionReturns the name of the field
Value Typestring
Formatstring = datafield.name()
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
Examples
name = datafield.name()

setvalue

DescriptionSets the value of the field
Value Type
Formatdatafield.setvalue(value)
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
ParameterValue TypeDescription
valueobjectThe value to be saved inside the field
Examples
datafield.setvalue("Yellow")

type

DescriptionReturns the field type
Value Typeinteger
Formatinteger = datafield.type()
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
Examples
typefield = datafield.type()

--values

None = -1
Text = 0
Note = 1
Image = 2
Percentage = 3
Check = 4
Currency = 5
Color = 6
Date = 18
IntegerNumber = 9
DecimalNumber = 10
Separator = 11
List = 12
Email = 14
GlobalCounter = 15
Subtable = 20
DocumentStatus = 21
Tree = 22
GeographicPosition = 24
Link = 25
Phone = 26
StatusList = 27
File = 28
ValueSplitter = 29
Signature = 30