I cannot extract data from Inheritance table in markdown of Parents form/page

ive tried using {{$nRecord.inheritanceField}} but it doesn’t work

Please minimize the reproduction of your problem in this application.

https://a_f3mpqavsiht.v7.demo.nocobase.com/admin/ttae4sfeiq0

I cannot recreate the problem in your site because there is no inheritance collection

But I will try to explain it here.

So I have created several collections

1) Inventory_Test (Main parent for inheritance)

2) Plumbing Collections (Inherited from Inventory_Test)


3) Lighting Specification Collection : (Inherited from Inventory_Test)

4) Order Collections : Where it has Many to one relationship to Inventory Collection. This collection is used to record the order data.

Then I added data to both Lighting Specification collections and Plumbing Specification Collections as shown in the image

The problem is:

{{#if (eq $nRecord.__collection "Plumbing_Specification_Test")}}
### Plumbing Inventory Details

| Field | Value |
|---------------------|----------------------------------------|
| Item Description | {{$nRecord.Item_Name}} |
| Material | {{$nRecord.Material}} |
| Length | {{$nRecord.Length}} |

{{else if (eq $nRecord.__collection "Lighting_Specifications_Test")}}
### Lighting Components Inventory Details

| Field | Value |
|--------------------|----------------------------------------|
| Item Description | {{$nRecord.Item_Name}} |
| Voltage | {{$nRecord.Voltage}} |
| Wattage | {{$nRecord.Wattage}} |
{{/if}}
  • The code works on identifying what the item’s collection is as shown in both images below

Unfortunately, it cannot fetch data from the sub-table it inherits, I have tried to use several code, but none works.

The debug code of:

{{json $nRecord}}

gives :

{“id”:2,“Item_Name”:“Pipe”,“__tableName”:“Plumbing_Specification_Test”,“__schemaName”:“public”,“Order_Collection”:,“__collection”:“Plumbing_Specification_Test”}

  • Fields from the sub-table doesnt appear

In “Order Collections”, the relationship field “Inventory_Order” is associated with the child table, not the parent table.
The parent table and the child table are independent tables, and there is no difference in their use, and they cannot be used across tables.

Im sorry, but what do you mean? My “Order Collections” is having relationsip with “Inventory table” which is the parent table. Child tables are “Lighting table” and “Plumbing table”

The relationship field “Inventory_Order” associates the parent table to obtain data from the parent table, and the associated child table to obtain data from the child table. The associated parent table cannot obtain data from the child table.