When creating a new associative record, the value from the linked parent record is not displayed in the add form

Hello!

I want to use values from the “parent” (associative) record Order when creating a new “child” record Transportation. The record is created in the Order record details (i.e., the ID of the record that should be linked to the newly created Transportation record is already known), but the fields from the Order are not displayed in the Transportation add form itself (via the associative link block).

Why is this happening? If you save a new Transport record created in this way, then later, for example, in the editing form Transportation, you can already display the associated data (field values) through the associative link

That is, at the moment of saving, the Order and Transportation are “linked.” So, does the new “Transportation” somehow “understand” which Order record it needs to “join”?

I understand if the Transportation record is created directly in a separate block of the Transportation collection, where it is not initially specified to which Order record the new Transportation record should be linked (to do this, you need to manually select the Order record in the many-to-one field).

Is this a bug, or is there a solution that I am not seeing?

The problem can be reproduced on the page:
https://a_8hwne7u84ho.v13.demo.nocobase.com/admin/on02hifb4i3/popups/49sblmzszn2/filterbytk/346796233850880/tab/du7brynzz1c

The reason I need this is as follows: I create Form data templates for adding (filling in form data) a new Transport record. Each time a new record is added, it is automatically added to the Template. But if I want to create a Transport record within another Order, all available templates (for all Orders) will still be displayed.

I tried to filter (set conditions) so that when adding a new Transportation record, only those “templates” that belong to the current parent Order record are displayed. But I can’t “get” the Order ID in the form for adding a new Transportation. Condition don’t wok…

Blocks added via “Associated records” will have their data associated with the main table by default.

Thank you for your reply, but I’m not quite sure if you can answer my question. Perhaps I didn’t explain myself clearly enough in my message?

I also noticed that the Markdown field allows you to display an associative (parent) field in the form of adding a new record.

I still don’t understand why I can’t use the value of the associative field for conditional rules in the form of adding a new record, and why the values are not displayed via a special “path” in the output settings for this field?

And if you pass the ID with the default value

@hongboji Can you help me with filtering data (records) as a template? In other words, when creating a new record in the form, for some reason the ID of the associative (“parent”) record is not visible, so the filter does not work. Even if I add a numeric field directly to the form and place the ID of the associated record in it, the filter still does not work for some reason - that is, the filter script does not “see” the values/data in the add form itself.

Simple, data templates are a very useful feature of NocoBase, and I will use it often, but if you don’t filter the entries that will be displayed in the template drop-down list, there will eventually be so many of them that you can get “lost” in such an abundance of entries when trying to select the right template.