Can linkToDataTable be used with the parameter hidden: true in the code even though it is an action function?
Yes. This is one of the exceptions. Why it is needed: you can call a temporary table, perform calculations in it, and retrieve data from it in a fully technical mode "without showing it to the user."
To do this, you need to use its parameter hide: true
when calling the function. By default, it is false
.
How do I use the value returned by the linkToDataTable function in this case?
When it is enabled, the temporary table does not open, and the result of the function will be a hash of the temporary table.
Using this hash, we can retrieve data from it. This is done by using the hash: $hash
parameter in functions like select
or set
:
=: selectRowList(table: 'tmp_table'; hash: $hash; field: 'data'; field: 'summ'; order: 'id' asc)
~hash: linkToDataTable(table: 'tmp_table'; params: $row_hide; hide: true)
row_hide: rowCreate(field: "order" = #order_number)
Using the resulting hash, can I access any field in the created hidden time table?
Yes.
How long is the created temporary table stored in the database?
1 hour
Is a temporary table created each time a line of code is called?
Yes, therefore such calls must be recorded ~
and used with great caution in the row part of the table!