Menu

Grandchildren: Viewing Parent, Child and Grandchild tables together

0 votes

Currently a selected record in a parent table filters the child table. Is there a way to have another level of filtering where the selected record in a child table filters the 3rd table ("grandchild table")?
And if not, would this be considered a custom coding request or core improvement?
Thank you!
Slava

in Customization by (140 points)
reopened by

2 Answers

0 votes

At the moment dbFront primarily shows the Parent and Child tables as you observed. Directly adding a Grandchild layer risks increasing the screen complexity and messing with the usability both for users and developers. This especially becomes a problem on smaller screens.

While dbFront primarily shows the Parent and Child tables, there is every possibility of making available other related tables such as Grandparent, Grandchild and Couple tables.

Grandparent Tables (M → 1)

Grandparent tables are always available as Lookups and Dropdowns. dbFront allows you to choose the fields shown as caption and within the Dropdown.

Grandchild Tables (1 → M → M)

There are three options for Grandchild tables.

  • Maximize
    To access Grandchild records, the first option is to teach your users to open the child record as a main record if they want to drill down. There is a "Maximize" icon at the top right corner of each child record. They can right click on this to open it in a new tab.

  • Table View
    A second option for Grandchild records is to summarize their details or even concatenate multiple records within a table view. The view could use XPATH, COALESCE, STRING_AGG or GROUP_CONCAT.

  • RunProcedure Action Button
    A third option is to have an action button that triggers a Stored Procedure that can return a result set into a dialog box. All that is needed as a Stored Procedure that returns a result set, with the Result set to either 'Table' or 'Automatic'.

For more details on concatenating records see: StackOverFlow Concatenating Records

The Table grid strips New-Lines in order to show a compact view but the Form field respects those New-Lines. This means a compact truncated version will appear in the table but the full value will show in the form.

Couple Tables (M ⇄ M)

A couple table is my other name for a table that shares a joining/associate child table to make a Many-to-Many relationship.

dbFront optionally allows direct editing of these Many-to-Many relationships via a multi-select dropdown.

If you still strongly want to see three levels then please send an email to [email protected] where we can continue the discussion further.

by (65.2k points)
edited by
The "Maximize" button does accomplish what I was looking for. Thanks for you help!
0 votes

As mentioned in the user group meeting, here's a screencap of the hacky way I display 3 level relationships via a popup modal window.
OpenURL button points to child table on a second database connection, passing child PK as url parameter. Custom CSS on that connection hides the child, only showing the grandchild. Maybe something like this can be implemented natively.

https://i.imgur.com/sc6qBxY.mp4

by (2.4k points)
Your right, it is hacky, but very effective.  I will have to think through this.
Welcome to the dbFront Q&A site, where you can ask questions and receive answers from other members of the community.
 | Minimalist Answer Theme by Digitizor Media
 |
Powered by Question2Answer
...