"updateLine"
Finds columns using key values and replaces certain values of a row.
Synopsis
1)
setValue (string shape, "updateLine", int n, string keyName1, <type1>
keyValue1 [, string keyName2, <type2> keyValue2 ...] string reName1,
<type1> reValue1 [, string reName2, <type2> reValue2 ...][, 0, int
rowFontType]);
shape.updateLine (int n, string keyName1, <type1> keyValue1 [, string
keyName2, <type2> keyValue2 ...] string reName1, <type1> reValue1 [,
string reName2, <type2> reValue2 ...][, 0, int rowFontType]);
2)
setValue ( string shape, "updateLine", int n, string keyName1,
<dyn_type1> keyValue1 [, string keyName2, <dyn_type2> keyValue2 ...]
string reName1, <dyn_type1> reValue1 [, string reName2, <dyn_type2>
reValue2 ...][, 0, int rowFontType]);
shape.updateLine (int n, string keyName1, <dyn_type1> keyValue1 [,
string keyName2, <dyn_type2> keyValue2 ...] string reName1,
<dyn_type1> reValue1 [, string reName2, <dyn_type2> reValue2 ...][,
0, int rowFontType]);
Parameters
Parameter | Description |
---|---|
shape | Name of the object |
n | Number of keys |
keyName1 | Name of the key column |
keyValue1 | Key value (type/dyn_type any) |
reName1 | Name of column to be replaced |
reValue1 | New value (type/dyn_type any) |
rowFontType |
The font type. There are four different font types available: 0 = Normal (default) 1 = Bold 2 = Italic 3 = Italic bold |
Description
This attribute is used to replace individual column values in the top line in which certain key columns have the specified key values. You can pass as many keys as you want, the number must however be indicated by the parameter "n". You can pass individual values and arrays with color information for the columns ("appendLines", If all key conditions are fulfilled, the columns to be replaced will be filled with the respective values.
If there is no row matching the keys, a row is added to the table based on the specified parameters. The parameter "rowFontType" allows defining a font type for a specific row.
You cannot replace columns defined as key columns. If this is the case, a new line is appended to the table with the specified parameters.
Example
In the following example, if "Miller" has been found in "Surname", the content of the cell in the same line in the column "Salary" will be set to 12000.
main()
{
TABLE1.updateLine(1, "Surname", "Miller", "Salary", 12000);
}
Assignment
Table