The parent record ID is not substituted when setting the default (from a parallel collection that has one parent)

* Describe the bug

There is a Collections structure:

  1. Orders
    1.1 Transportation
    1.1.1 Cargo Locations
    1.1.2 Transportation Routes

Cargo Locations and Transportation Routes have one “parent” - Transportation. Cargo Locations and Transportation Routes are linked to each other through a many-to-many relationship.

If I add a new Transportation Route and want to add a new Cargo Location at the same time in the add record form (where I also need to link it to the parent Transportation), the parent is not actually displayed in the Transportation select field, where I want to specify the parent by default. Instead, the value “N/A” is displayed (in the condition settings, I substitute the ID of the parent Transportation record). But at the same time, if I submit this combination of a complex form and a subform, the correct parent record is still connected in the Transportation parent field. But I am confused by the fact that the current parent is not loaded when filling out the add form… More details are in the video file.

With the developer’s permission, I took the initiative and used a special version of NokoBase provided in the thread An incorrect related record is displayed in the sub-details of the parent record list (Modern version 2.0 page) - #2 by hongboji

Direct link: https://a_8hwne7u84ho.v13.demo.nocobase.com/admin/on02hifb4i3/popups/49sblmzszn2/filterbytk/338414241251328/tab/du7brynzz1c/popups/iuntjlhjg6f/filterbytk/338414750859264/sourceid/338414241251328/tab/36154x06sk1

To sum up, the parent record in the logical block of condition settings is not loaded (although all the prerequisites for this are in place and should work).

* Environment

  • NocoBase version: v2.0.0-alpha.59
  • Database type and version: PostgreSQL
  • OS: Linux
  • Deployment Methods: Docker

* How To Reproduce

A video file is provided below:

Why do I consider this a problem, even though it works? Because it will confuse the end user (e.g., a manager) due to the absence of the correct value in the field.

Please refer to:

1 Like

Thank you very much for the tip! I apologize, I probably didn’t read the documentation carefully enough. I’m still new to developing on this platform, so I may ask some silly questions.
However, it worked! I configured it as shown in the example in your forum link with a solution to a similar problem, and the desired entry is displayed in the field - by default!
Thank you again, you have a very cool platform and excellent professional support!

This problem can be considered solved.