When you need to avoid duplication of records in a table, you can use a convenient mechanism.

One of the columns can be set as the so-called "primary key".

After that, all added rows will be analyzed and if the table already has a row with the same value in the column, then a new row will not be created.

And if a row is added not by a simple "add_row" directive, but by "add_row_sum", then the values ​​of the numeric columns will be summed up in the detected row (see add_row_sum).


Example to make column #1 key:

ts_table(TableDescr1,"set_first_key",1);


An example to make a column named "Object Name" a key column:

ts_table(TableDescr1,"set_first_key","Object name");