Question
In the field formatting, when I set setformat: "hide", it doesn't work for the table. It works in the panel, but the field doesn't hide in the table.
My task is as follows: In the inventory movement document, the Recipient field should only appear when a specific document type is selected in another field. The lock for editing works, but the field itself doesn't hide. It's located in the header.
Am I doing something wrong?
Answer
Field hiding is moved to Table Formatting because you cannot hide a field in a column only in certain rows. It can only be done entirely.
The parameter fieldhide: "field_name" = true
in the setTableFormat
function within the Table Formatting section.
This parameter unchecks the field visibility in the field visibility management — in Field Visibility Management (eye). It does not turn back on by itself — if you need to show the field under other conditions, you need to specify it — fieldhide: "field_name" = false
.
There is also an option to disable it so that the user does not see this field in Field Visibility Management (eye) — fieldhide: "field_name" = "force"
, but the field with its values is still transmitted to the page code, so this is not a secure way to hide information.
You can also use the parameter fieldsgide: json["field_name_1","field_name_2"]
. This parameter hides fields in the "force" type if the condition in condition is met and returns false if it is not met.