on 2021 Jun 16 11:33 AM
Hi All,
I have created a fiori elements app using a CAP module that exposes an oData v4 service. I am using the list report layout. We have the adapt filter button in the filter bar and the column personalisation button on the table. Currently the selection/line item fields mentioned in my annotation.cds renders the default view and rest of the fields move to the adapt filters and personalisation button. I dont want to show all the fields in the adapt filter and column personalisation. So for hiding the field in the filter bar i can use the annotation @UI.HiddenFilter. What annotation can be used to hide the property in the personalisation button? if i use @UI.Hidden that field is completely removed from UI because i have to show that field in the detail page. I just want to hide that property in the personalization button?
Thanks,
Kachin
Request clarification before answering.
Hello Kachin,
If you are using UI5 version 1.85+, you can define this setting in your app's manifest.json. Notice that this would mean it is a configuration in the UI app and not in the service.
In your app's manifest.json, under sap.ui5/routing/targets/<YOUR_VIEW_TARGET_NAME>/options/settings/controlConfiguration/<YOUR_LINEITEM_ANNOTATION>/columns/"DataField::<YOUR_PROPERTY_NAME>"/availability
Here's an example (please excuse the formatting limitations) -
{
"sap.ui5": {
"routing": {
"targets": {
"SalesOrderManageList": {
"options": {
"settings": {
"controlConfiguration": {
"@com.sap.vocabularies.UI.v1.LineItem": {
"columns": {
"CustomColumnRating": {
"header": "{i18n>LR.Custom_Column|Button}",
"width": "10em",
"horizontalAlign": "Center",
"position": {
"placement": "After",
"anchor": "DataFieldForAnnotation::FieldGroup::multipleActionFields"
},
"template": "SalesOrder.custom.CustomColumnButton",
"availability": "Default",
"properties": [
"ID",
"TotalNetAmount",
"_CustomerPaymentTerms/CustomerPaymentTerms",
"_ShipToParty/BusinessPartner"
]
}
}
}
}
}
}
}
}
}
}
}
You can have the following options for this setting -
availability*"Default" | "Adaptation" | "Hidden"Defines where the column should be shown.
Note: This setting can also be used for existing annotation columns.
You would require such a configuration for all the properties belonging to the entity bound against your table, which you do not want to expose for personalization. The setting that should work for you here is "Hidden".
I hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's the link to the concerned docu - https://ui5.sap.com/1.85.5/#/topic/d525522c1bf54672ae4e02d66b38e60c
User | Count |
---|---|
59 | |
7 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.