Skip to Content

Issue with metadata annotation: field-control (deep entity)

Hi all,
I think I might have found an issue with metadata annotations.
I'm using Attribute sap:field-control to describe the fields that are editable / mandatory / etc..
According to this page, it should be possible to refer to a deeper (expanded) entity for the field-control value, but my Smartform doesn't automatically react to these attributes Am I missing something?

Below is a collage with the different screenshots, to clarify
And this is the slack thread for the same question:
https://openui5.slack.com/archives/C0R5DSPDL/p1549031463173200

image.png (186.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 10 at 11:11 PM

    Hey Christophe,

    when you say that your SmartForm does not react on the given FieldControl value - I assume you mean the SmartField in your SmartForm, right?

    If yes...

    ...it makes always sense to check the control-specific annotation documentation, as here the supported annotations in general and - in certain cases - the supported aspects are mentioned.

    When you look here: https://ui5.sap.com/#/api/sap.ui.comp.smartfield.SmartField/annotations/FieldControl you can read one detail which might be the "anwer":

    FieldControl

    Defines the rendering of the field from a dynamic value that can be provided as a path by referencing another Property within the same EntityType.

    So having a path with a navigation property in the fieldcontrol is - according to the SmartField documentation - not supported.

    BR
    Alex

    Add comment
    10|10000 characters needed characters exceeded

    • Thank you for the reply!
      However I would like to point to this page, which caused my confusion in the first place.
      It says: "The field-control property can be in the same type as shown above, or it can be in a nested complex type, or in an entity type that is associated 1:1."


      So whether or not the nested property can be read is control-specific then?
      My use-case has a lot of fields and having the rights + fields in the same entity is making the whole thing hard to read.

  • Feb 08 at 01:32 PM

    is the association 1:1?

    Add comment
    10|10000 characters needed characters exceeded