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
Request clarification before answering.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.