Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CDS view hide column but keep the filter

2,129

Hello,

I have a CDS like the following, which I am using as value help (annotations omitted here)

define view ZZVIEW
  as select from ZZTABLE                               
{      
  key fieldA
      fieldB     
}

In the consumption view, I need to be able to filter on fieldB but I don't want the table to show the fieldB column.
I tried the annotations @UI.lineItem: [{hidden: true}] and @Consumption.hidden: true but they hide both the column and the filter.

Is there any annotation that I can use to achieve this?

Thanks

4 REPLIES 4

junwu
Active Contributor
0 Kudos
694

how about removing @Consumption.hidden: true

dommeyer
Explorer
0 Kudos
694

oussama.kassah2 do you found a solution regarding this topic?

0 Kudos
694

Unfortunately this does not seem to be possible. You need to add a custom filter on the front end..

arnabdatta3
Participant
0 Kudos
694

Hi,

Please expose the sub CDS as an association and filter it with odata query as below.

/sap/opu/odata/sap/TOP_CDS/<EntitySet>?$filter=param1 eq '11234' and <Association>/<Sub CDS column name> eq '111111'&$format=json

Check the odata call procedure more

OData Query Options | Mendix Documentation Section 4.5