stable
- Last UpdatedSep 05, 2024
- 2 minute read
This topic is about the STABLE data type.
Value syntax
1|2|uid|comment|345|aComment
Description
STABLE is structured as a pipe separated ('|') array. Contents are listed as follows: -number of rows, -number of columns, -column names, row values.
Note: For versions prior to 4.0.7, the behavior of the attributes is different. In those versions, an attribute that returned a new SSTABLE value also did an override on the original field value.
Attributes
These are the attributes for STABLE.
|
Attribute |
Attribute type |
Attribute description |
|---|---|---|
|
[row,col] or elementAt(row,columnName) |
sstring |
To obtain the corresponding cell value. |
|
addRow(rowContent) |
stable |
Returns a copy of the STABLE and adds a row at the end of the table by passing all needed row content, separated by pipes (‘|’). Don’t place a pipe (|) at the end of the row. |
|
cols |
sint |
Number of columns. |
|
filterByCondition(columnName,condition) |
stable |
Returns a new table containing only those rows whose column value match the given condition. Filtering condition must include operation and value. Example: aNode.aStableField.filterByCondition(aColumn,!=12). |
|
getRow(SINT) |
sstring |
Returns the row at the given index, in the form of the values separated by pipes (‘|’) |
|
getStructure |
sstable |
Returns an empty stable with the same columns of the stable |
|
isModified |
sbool |
Set to True in the frame where the value of this field is modified. |
|
remRow(SINT) |
stable |
Returns a copy of the STABLE and removes the row at the specified index. |
|
rows |
sint |
Number of rows. |
|
setElementAt(row,col,value) |
stable |
Returns a copy of the STABLE and overrides the content of the addressed cell with passed value. |
|
setElementAtColumn(row,columnName,value) |
stable |
Returns a copy of the STABLE and overrides the content of the addressed cell with passed value. |
|
setRow(SINT,rowContent) |
stable |
Returns a copy of the STABLE and overrides a whole row by passing its index ant the full row content, separated by pipes (‘|’). Do not place a pipe (|) at the end of the row. |
|
sortAsc(SSTRING) |
stable |
Returns a copy of the stable sorted in ascending order on the passed column name |
|
sortDesc(SSTRING) |
stable |
Returns a copy of the stable sorted in descending order on the passed column name |
|
type |
sstring |
Returns the type name. |