Question on display of referenced table

I’m building a CRM with AppSheet (frontend) and PostgreSQL/Supabase (backend). My clients table has an entity_type column (e.g., ‘Limited company’, ‘Individual’). I have separate detail tables (ltd_details, individual_details, etc.), each linked to clients via client_id.

Goal: Display the relevant detail fields (e.g., company_number from ltd_details or ni_number from individual_details) directly inline on the clients detail view, based on the client.entity_type.

What I’ve done:

  1. All detail tables (ltd_details, individual_details, etc.) are added to AppSheet.

  2. The client_id column in each detail table is set as Ref to clients, and the “Is a part of?” checkbox is checked.

  3. On the clients table, I’ve created virtual columns (e.g., Related LTD Details) for each detail type.

    • Type: Ref

    • Referenced Table: Corresponding detail table (e.g., ltd_details).

    • App Formula (tried both):

      • IF([entity_type] = “Limited company”, ANY(FILTER(“ltd_details”, [client_id] = [_THISROW].[id])), “”)

      • IF([entity_type] = “Limited company”, LOOKUP([_THISROW].[id], “ltd_details”, “client_id”, “id”), “”)

    • Show_If: [entity_type] = “Limited company” (for Related LTD Details VC).

Problem:
Despite this setup, instead of the ltd_details fields showing inline on the client detail view, I’m consistently getting a “View Ref” button with a COUNT() of columns. AppSheet isn’t rendering the related record inline as expected from “Is a part of?” relationships.

Also, can I not have the same format of “field name”: “field value” shown in my client detail? Must I have the embedded table like I see in “Client contacts”?

I’m new to appsheet, what am i missing?

You should just show the [Related…] columns, they’ll display as inline tables that you can control the column order for, no need for an additional virtual column.

3 Likes