Question
Can we configure it so that when opening a table using linktotable, a specific set of fields is displayed, rather than all of them? And when opening the table normally, all fields are displayed.
Answer
This is done through the prefilter field. When calling linkToTable, you pass some indicator, for example, true, to the hidden but editable prefilter field.
Then, in Table Formatting, you check this prefilter field, and if the value is true, you hide the fields. It is most convenient to do this through the fieldshide parameter:
f1=: setTableFormat(condition: #fl_check_field = true; fieldshide: json`["field_1","field_2"]`)
Note that this method is a non-strict data hiding. Data hidden through fieldshide and fieldhide fields are transmitted to the user's browser and can be viewed through the page's source code.