The object represents an additional table within a dataview form. The tableview can only be saved through its parent dataview object, if present.
Availability
The object is available only in specific execution contexts, or is created by a function provided by other objects
Pre-initialized in
Row added to a data table, Pre-save of data table row, Counter acquisition for a data table row, Post-save of data table row, Pre-move of data table row to recycle bin, Row restored from recycle bin, Pre-deletion of data table row, Post-deletion of data table row, Row action on a data table, Value changed in a data table row cell
rowinvoice = customerview.getatable("invoice_rows")
for i=10,1,-1 do
row = rowinvoice.adddatarow()
row.setvalue("code",i)
end
customerview.save()
adddatarow
Description
Adds a new datarow object to the collection of rows present within the table
Value Type
datarow
Format
datarow = tableview.adddatarow()
Type
Method
Systems
Windows, Web, Android, IOS, Mac OS
Examples
row = tableview.adddatarow()
countrows
Description
Returns the number of datarows present in the table
Value Type
single
Format
single = tableview.countrows()
Type
Method
Systems
Windows, Web, Android, IOS, Mac OS
Examples
number_row = tableview.countrows()
dataview
Description
Retrieves the dataview containing this tableview if present
Value Type
dataview
Format
dataview = tableview.dataview()
Type
Method
Systems
Windows, Web, Android, IOS, Mac OS
Examples
view = tableview.dataview()
deletedatarow
Description
Deletes a specific datarow from the tableview
Value Type
boolean
Format
boolean = tableview.deletedatarow(row)
Type
Method
Systems
Windows, Web, Android, IOS, Mac OS
Parameter
Value Type
Description
row
datarow
The datarow to be deleted
Examples
bool = tableview.deletedatarow(row)
enableadd
Description
Enables or disables the button to add rows in the table
Value Type
boolean
Format
boolean = tableview.enableadd
Type
Property
Systems
Windows, Web, Android, IOS, Mac OS
enableorder
Description
Activates or deactivates the buttons for sorting the rows in the table
Value Type
boolean
Format
boolean = tableview.enableorder
Type
Property
Systems
Windows, Web, Android, IOS, Mac OS
enableremove
Description
Activates or deactivates the button to delete the rows in the table
Value Type
boolean
Format
boolean = tableview.enableremove
Type
Property
Systems
Windows, Web, Android, IOS, Mac OS
enablevalue
Description
Enables or disables editing of a specific column
Value Type
Format
tableview.enablevalue(fieldname, enabled)
Type
Method
Systems
Windows, Web, Android, IOS, Mac OS
Parameter
Value Type
Description
fieldname
string
The name of the column in the table
enabled
boolean
The value that enables or disables editing
Examples
tableview.enablevalue("name",true)
getrows
Description
Retrieves the complete list of datarows present in the table
Value Type
list<datarow>
Format
list<datarow> = tableview.getrows()
Type
Method
Systems
Windows, Web, Android, IOS, Mac OS
Examples
rows = tableview.getrows()
showconfirm
Description
Displays a confirmation message
Value Type
Format
tableview.showconfirm(message)
Type
Method
Systems
Windows, Web, Android, IOS, Mac OS
Parameter
Value Type
Description
message
string
The message to display
Examples
tableview.showconfirm("Save confirmed")
showerror
Description
Displays an error message
Value Type
Format
tableview.showerror(message)
Type
Method
Systems
Windows, Web, Android, IOS, Mac OS
Parameter
Value Type
Description
message
string
The message to display
Examples
tableview.showerror("Error!")
showwarning
Description
Displays an alert message
Value Type
Format
tableview.showwarning(message)
Type
Method
Systems
Windows, Web, Android, IOS, Mac OS
Parameter
Value Type
Description
message
string
The message to display
Examples
tableview.showwarning("Warning!")
tablename
Description
Returns the name of the table
Value Type
string
Format
string = tableview.tablename()
Type
Method
Systems
Windows, Web, Android, IOS, Mac OS
Examples
tablename = tableview.tablename()
update
Description
Forces the update of the calculation expressions present in the table