CFO allows to define which fields will be shown in
"filters"
is the node under "interface"
that allows to define filter for the view. A filter contains: text fields, selects, dynamic selects..
"{table}/{entity}":{
"interface":{
...,
"filters": [
{
"field": "FinancialDepositMovement_DirectoryOrganization_Id",
"field_name": "Organization",
"type": "select",
"external_values": "db",
"entity": "CF_DirectoryOrganizations",
"fields": "DirectoryOrganization_Id,DirectoryOrganization_Name",
"linked_field": "DirectoryOrganization_Id",
"allow_empty": false,
"defaultvalue": 1,
"cookie": "DirectoryOrganization_Id"
},{
"field": "FinancialDepositMovement_DateOperation",
"field_name": "Year",
"type": "select",
"external_values": "db",
"entity": "CF_FinancialDepositMovements",
"fields": "FinancialDepositMovement_DateOperation",
"field_type": "year",
"order": "FinancialDepositMovement_DateOperation DESC",
"allow_empty": true,
"empty_value": "Year?",
"defaultvalue": null
},{
"field": "FinancialDepositMovement_Reconciliated",
"name": "Is Active",
"type": "select",
"values": [{"id": null,"value": "Is reconciliated?"},{"id": 0,"value": "Reconcialted NO"},{"id": 1,"value": "Reconciliated YES"}],
"defaultvalue": null
},
"views": {
"default": {
"name": "General View",
"all_fields": true,
"_server_order": "date_insertion DESC",
"server_limit": 500,
"server_where": {"status":"active"},
"fields": [
{"field": "license_id"},
{"field": "date_activation","order": "desc"},
{"field": "status"},
{"field": "device_imei"},
{"field": "device_brand"},
{"field": "device_model"},
{"field": "user_id"},
{"field": "device_age"}
]
}
}
}
}
The behaviour between Database and Entity is quite significant but they share the same properties.
filter "type":"select|autocomplete"
unique: (true|false) it says that if the content of the filter is sent and unique is true then avoid the rest of the filters
avoid_order: (true|false) when this attribute is true then the server_order of the view is deleted to avoid