cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Fiori - Remove Adapt Filter Button

Ngarasa
Explorer
0 Kudos
262

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

Ngarasa_0-1747234330929.png

I did restrict what fields are available to filter, so in my "Adapt Filters" only appears this ones

Ngarasa_1-1747234387260.png


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?

Accepted Solutions (0)

Answers (1)

Answers (1)

MioYasutake
Active Contributor
Ngarasa
Explorer

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.