Represents table object (usually it’s value of table DCI).
columnCount ⇒ Integer
-
Number of columns.
columns ⇒ Array<TableColumn>
-
Array of column definitions.
instanceColumns ⇒ Array<TableColumn>
-
Array of column definitions including only columns marked as instance columns.
instanceColumnIndexes ⇒ Array<Integer>
-
Array with indexes of columns marked as instance columns.
rowCount ⇒ Integer
-
Number of rows.
rows ⇒ Array<TableRow>
-
Array of rows with data.
title ⇒ String
-
Title of table.
addColumn(name, [type], [displayName], [isInstance]) ⇒ Integer
-
Adds column to table
name |
String |
Column name |
type |
Integer |
Data type, optional parameter. Default is String |
displayName |
String |
Column display name |
isInstance |
Boolean |
|
Column index
addRow() ⇒ Integer
-
Adds row to table
Row index
deleteColumn(columnId) ⇒ void
-
Delete column
columnId |
Integer |
Column index |
deleteRow(rowId) ⇒ void
-
Delete row
rowId |
Integer |
Row index |
findRowByInstance(instance, instance2, …) ⇒ [class-tablerow]
-
Finds row by instance
instance |
String |
Instance string |
instance2 |
String |
Optional. If instance is composed of several columns, these can be supplied as additional parameters. |
Table row that corresponds to provided instance
findRowIndexByInstance(instance, instance2, …) ⇒ Integer
-
Finds row index by instance
instance |
String |
Instance string |
instance2 |
String |
Optional. If instance is composed of several columns, these can be supplied as additional parameters. |
Table row index corresponds to provided instance
get(rowId, columnId) ⇒ String
-
Get cell value by row and column id
rowId |
Integer |
Row index |
columnId |
Integer |
Column index |
Cell value as string
getColumnIndex(columnName) ⇒ Integer
-
Get column index by column name
columnName |
String |
Column name |
Column name
getColumnName(columnId) ⇒ String
-
Get column name by column index
columnName |
Integer |
Column name |
Column index
print() ⇒ String
-
Prints the whole table with it’s content and header
String with formatted table
set(rowId, columnId, value) ⇒ void
-
Set column value by row and column index
rowId |
Integer |
Row index |
columnId |
Integer |
Column index |
value |
String |
New value |
Column index
trace(tag, level, prefix, headers, delimiter) ⇒ void
-
Dump table to log
tag |
String |
Target debug level, default "nxsl.trace" |
level |
Integer |
Target debug level, default "0" |
prefix |
String |
Optional target prefix; will be added before each line in log file, default 'NULL' |
headers |
Bolean |
Optional target header, default 'true' |
delimiter |
String |
Optional record separator, default ',' |