Show property of related object in grid fields

Is it possible to show a property of a related object in the datamanager grid fields?

Example:
Say you have an object “country” with fields “country_name” and “iso_code”, with “country_name” being the label field. Then you have an object “city” with a property “country” (ofc related to the first object).

Now if I use @datamanagerGridFields city_name,country the grid shows the country name, but I would like to use the field iso_code instead.

I already tried the following
@datamanagerGridFields city_name,country.iso_code
@datamanagerGridFields city_name,${prefix}country.iso_code
@datamanagerGridFields city_name,city$country.iso_code

How can I do this, please?

OK, apparently this was a case of Monday morning brain block … I can just use formula fields, of course.

1 Like

An example for future googlers:

/**
 * ...
 * @datamanagerGridFields label,region_name
 */
component {
    // ...
    property name="country" relationship="many-to-one" relatedto="country";

    property name="region_name" formula="${prefix}country$region.label";
}