cancel
Showing results for 
Search instead for 
Did you mean: 

Hide LineItem in view but still use it for semantic object navigation

jgonzal
Explorer
0 Kudos

Hi, 

I have declared this lineItems: 

@odata.draft.enabled
annotate service.REBuildings with @(UI.LineItem: [
    {
        $Type: 'UI.DataField',
        Value: buildingCode,
        Label: '{i18n>Code}',
    },
    {
        $Type: 'UI.DataField',
        Value: description,
        Label: '{i18n>Description}',
    },
    {
        $Type: 'UI.DataField',
        Value: ToSite_siteCode,
        Label: '{i18n>Site}',
    },
    {
        $Type: 'UI.DataField',
        Value: buildingStatus_code,
    },
    {
        $Type: 'UI.DataField',
        Label: '{i18n>Buildingcode}',
        Value: buildingType_code,
    },
    {
        $Type: 'UI.DataField',
        Value: ToSite_ID,
        Label: 'siteID',
    },
]);
 
I want to hide the last one (ToSite_ID) in the view but I still need to declare it in order to perform semantic object navigation to sites entity, I tried to use ![@UI.Hidden]: true but this hides the value in the UI and eliminates it from the oData call. 
 
Does someone know how to achieve this functionality?

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

don't add the field to the lineitem, but you can still have the field in your odata by using requestatleast

jgonzal
Explorer
0 Kudos
Could you please provide an example on how to use that functionality and where to add it? Thank you