cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori Elements: @UI.CreateHidden with $Not + $Path expression is not working

05-11-2025 10:40 PM
MioYasutake SAP Champion
1231 views 2 comments
0 Likes
SAP Managed Tags
Subscribe

Hi everyone,

I'm currently facing an issue with a Fiori Elements List Report application based on CAP (Cloud Application Programming Model). I’m trying to conditionally hide the “Create” button using the `@UI.CreateHidden` annotation with a $Not + $Path expression, like this:

annotate CatalogService.Books with @(
  UI.CreateHidden : { $edmJson: { $Not: { $Path: '/CatalogService.EntityContainer/FeatureControl/createEnabled' } } }
);

The EDMX output looks correct:

<Annotation Term="UI.CreateHidden">
  <Not>
    <Path>/CatalogService.EntityContainer/FeatureControl/createEnabled</Path>
  </Not>
</Annotation>

The singleton entity FeatureControl is correctly exposed and returns the following response:

{
  "createEnabled": false,
  "createHidden": true
}

When I reference createHidden directly with a simple $Path, it works as expected and the Create button is hidden. However, when using the $Not + $Path version, the Create button remains visible.

Has anyone successfully used $Not expressions in annotations like `@UI.CreateHidden` in a Fiori Elements List Report?

Any insights or workarounds would be greatly appreciated.

UI5 version: 1.135.0

Git repository link: https://github.com/miyasuta/cap-feature-control

 

0 Likes

Accepted Solutions (0)

Answers (0)