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?
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.
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.
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.