cancel
Showing results for 
Search instead for 
Did you mean: 

CDS and Fiori Elements (CAP Variety): How to hide fields from sort.

Hi experts,

I'm working on a CAP project with a Fiori Elements UI. I have a description field for a product. I want to display this on the Object Page, but I don't want any reference to it to show up in tables. I'm not sure how to do this though.

Annotation @UI.Hidden will hide it everywhere, including the object page. Is it possible to override this annotation for specific cases?

Or, is there a way to target @UI.Hidden specifically to sorting, as with UI.LineItem?

For example, this code hides the description field from being displayed as a table column. However, it still shows up in the filter menu AND in the sort menu.

LineItem            : [
    {
      Value : descr,
      ![@UI.Hidden]
    }
  ],

Using the annotation @UI.HiddenFilter I was able to remove the descr field from the filter menu. However, I could not find a matching annotation for the sort menu.

I tried using a similar format for LineItem by assigning [![@UI.Hidden] as below:

PresentationVariant : {
    Text           : 'Default',
    SortOrder      : [{Property : descr, ![@UI.Hidden]}],
    Visualizations : ['@UI.LineItem']
  },

However, this also had no effect on the UI. Is there a way to meet my requirement here, or does CDS and Fiori Elements not yet support this functionality?

Thank you very much for your time!

Evg
Explorer

Hi Brian, were you able to solve it ?

I'm dealing with the same chalange

View Entire Topic
Evg
Explorer
0 Kudos

Hi Brian

i was able to solve it by annotationg the entity with sort restrictions

in case of cap
@Capabilities.SortRestrictions.NonSortableProperties : [ ... proreties to hide ]

Br

Evgeniy