on 2025 May 14 3:54 PM
Hello. Im trying to create a list report page, and I want to remove a "Adapt Filters" button.
This is what my page looks like
I did restrict what fields are available to filter, so in my "Adapt Filters" only appears this ones
But still, I do not want the adapt filter to be shown.
This is my annotations.cds file content:
using CENCERROService as service from '../../srv/service';
/* COLUMNS */
annotate service.ORDENTRABAJO with @(
UI.LineItem : [
{ $Type : 'UI.DataField', Label : 'Id', Value : Id },
{ $Type : 'UI.DataField', Label : 'Descripcion', Value : Descripcion },
{ $Type : 'UI.DataField', Label : 'Labor', Value : Labor },
{ $Type : 'UI.DataField', Value : Estado, Label : 'Estado' }
]
);
/* FILTERS */
annotate service.ORDENTRABAJO with @(
UI.SelectionFields : [ CampoId, Descripcion, EstadoId ]
);
/* FILTER: CAMPO */
annotate service.ORDENTRABAJO with {
CampoId @(
Common.ValueList : {
$Type : 'Common.ValueListType',
CollectionPath : 'CAMPO',
Parameters : [ { $Type : 'Common.ValueListParameterInOut', LocalDataProperty : CampoId, ValueListProperty : 'Id', }, ],
Label : 'Campo',
},
Common.ValueListWithFixedValues : true,
Common.Label : 'Campo'
)
};
annotate service.CAMPO with {
Id @Common.Text : { $value : Descripcion, ![@UI.TextArrangement] : #TextFirst, }
};
/* FILTER: ESTADO */
annotate service.ORDENTRABAJO with {
EstadoId @(
Common.ValueList : {
$Type : 'Common.ValueListType',
CollectionPath : 'ESTADO',
Parameters : [ { $Type : 'Common.ValueListParameterInOut', LocalDataProperty : EstadoId, ValueListProperty : 'Id', }, ],
Label : 'Estado',
},
Common.ValueListWithFixedValues : true,
Common.Label : 'Estado'
)
};
annotate service.ESTADO with {
Id @Common.Text : { $value : Descripcion, ![@UI.TextArrangement] : #TextFirst, }
};
/* FILTER: DELETE SEARCH INPUT */
annotate service.ORDENTRABAJO with @Capabilities : {
SearchRestrictions : {
$Type : 'Capabilities.SearchRestrictionsType',
Searchable: false
},
FilterRestrictions : {
$Type : 'Capabilities.FilterRestrictionsType',
FilterExpressionRestrictions : [
{ Property: 'CampoId', AllowedExpressions: 'SingleValue' }
],
RequiredProperties: [ CampoId ],
NonFilterableProperties : [ Campo, Estado, HasPlanificadas, HasReales, Id, Labor, LaborId ]
},
Deletable : false
};
Any help out there?
Request clarification before answering.
To my knowledge, it is only achievable with a controller extension.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you MioYasutake. I had seen this community question, but I dont think this is acceptable by SAP. They cant make a button that wont be able to hide by developers in a easier way.
User | Count |
---|---|
33 | |
22 | |
17 | |
8 | |
7 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.