Where is the table formatting code?
Table parameters — Table formatting.
What function is used in the table formatting block?
Does row and field formatting override table formatting?
Yes — priority in this order:
table formatting
row formatting
field formatting
That is, the field overrides everything. The row overrides the table.
What parameters are responsible for blocking insertion, deletion and duplication?
In setTableFormat, most parameters are applied specifically to the table:
blockdelete
— blocking the deletion of rows.
blockduplicate
— blocking duplication.
blockorder
— blocking sorting by n
.
blockadd
— blocking the addition of rows to the table.
For example, you can block the addition of rows if there are more than 5:
f1=: setTableFormat(condition: $calc >= 5; blockadd: true)
calc: listCount(list: $list)
list: selectList(table: $#ntn; field: 'id')
Is it possible to change the header of the table by condition?
This is handled by the tabletitle
parameter, and for the row part by rowstitle
:
For example, changing the table title depending on the prefilter values:
f1=: setTableFormat(tabletitle: str`"Indicators for" ++ $dateform`)
dateform: dateFormat(date: #fl_date; format: "F"; lang: "ru")
How do I change the header of a field by condition?
This is handled by the fieldtitle
parameter, for example:
f1=: setTableFormat(fieldtitle: 'field_name' = $title)
title: if(condition: #type = 2; then: "Marginal Income"; else: "Net Profit")