Display related table field instead of id

Feature(s) impacted

Model Relationship modeling.

Observed behavior

Hello,

I’m trying to understand how to configure the display of relationships.

I have a table “Invoice” with a relation to another table “Organization”. An Invoice item has a relation to an organization.

I have a belongsTo relationships between to two tables. And I see the id of the related items.

I want to display a specific field from the Organization table to have the name of the Organization in my Invoice collection.

Expected behavior

Here, I want to display “Diego” instead of “95” in my Invoice collection for the field “Client”.

Context

  • Project name: MyFlightConnect
  • Team name: MyFlightConnect
  • Agent type: Postgres

Hello and welcome :slight_smile:
You can set “a reference field” to display a specific field instead of the id in your collection views.
It’s really simple:
Click on the button “edit layout”, navigate to your collection setting by clicking on the nut icon and click on the reference field input.
A screenshot of a random app to illustrate my explanations.


I hope it will help you :pray:

Perfect!
Indeed it was simple.

The funny thing is I did see somewhere somebody talking about “Reference Field”. When I tried to look at it in the documentation, I got nothing.



May this post help somebody through google :pray:

2 Likes

:partying_face:
Yes it’s not documented, I will push it to the product board.
Ty.