Different instance name appear


I have a lot of many to one relationships to A entitiy. And I want it to differently appear. I tried to edit the entities view, like I checked the boxes which should actual appear, but the screens did not care about it.
So example B -> A, and C->A. And I want A in B to show A’s x,y attribute, but in C i want only show A’s x. I tried at B view to check y attribute too, but it did not appear.
What should I do?


Hi Carol,

The instance name can be defined for an entity only once, and it affects the _minimal view. But you can can use the captionProperty attribute of your UI component (PickerField, etc.) to display different attribute of the entity.


Could you please write an example for me? Because the documentation do not tells too much.
I guess something like that?

<column id="a" captionProperty="x"/>

Or what value should I give to captionProperty?

Better you create a sample with your problem and we’ll try to fix it.

Okay, so I created and attached a sample project which demonstrates what I wrote.
So in B, A’s x and y is shown.
But in C only A’s x should, and now both appears.

Okay, so I do not see it attached, I try again.

sampleNamePattern.zip (276.0K)

I’ve fixed your project:

In order to show property X of related entity in c-browse.xml I use in table and for the field group.

I’ve also made the task a bit more complicated. What if you need to show not a single attribute but a combination of attributes different from instance name? In this case, introduce a non-persistent attribute defined by a getter:

    @MetaProperty(related = {"y", "z"})
    public String getYz() {
        return y + "," + z;

And use it as a regular attribute in columns and field group’s captionProperty attributes. See d-browse.xml.

The project is attached.

sample.zip (43.0K)

1 Like