Question
There is a Cycles table with a Pre-filter, which is used to open it, sorted by this pre-filter through the linkToTable
call. The task is how to record the pre-filter value in the table inside the created Cycle when creating a cycle?
Answer
In the Cycles table, create a technical field that uses Code to take the values of the necessary prefilters when added.
Code in the technical field in the Cycles table:
=: #fl_prefilter_name
In the table within the cycle, data is taken by Code from this field.
Code in the field in the table within the Cycle:
=: select(table: 'cycle_table'; field: 'teh_field'; where: 'id' = $#nci)
$#nci
— this is a quick variable that returns the cycle number within the cycle. The cycle number is the id of the row in the Cycles table. Therefore, to get the desired value from the technical field, we take it by the condition where: 'id' = $#nci
, which means from the row related to the current cycle.It is important to remember that prefilters exist only when acting from the web interface.