Here is a common scenario, where you may have 2 main data tables, then a single โjoinโ table that is a child of both. In the attached sample app, you see the scenario of product and order, with the join table being line_item. In the join table, there is a reference to a product record, as well as an order record, amongst other data such as quantity.
The Detail views for both parent tables will show an inline view of โRelated line_itemsโ. However there is no โnaturalโ way to show a different inline view depending on which parent table the user is in. Consider that from product, youโd want to see [order] and [qty] columns, but from order, youโd want to see [product] and [qty] columns.
The way to accomplish this is to start by creating a new slice for line_item table.
Next, in one of the parent tables (I chose product), create a new Virtual Column. Youโll copy the REF_ROWS() expression from the existing โRelatedโฆโ VC, and simply change the table name to the name of the new slice.
REF_ROWS("new slice name" , "ref-column" )
You can find the sample app โDiffering Inline Viewsโ on my portfolio, here:
https://www.appsheet.com/portfolio/546920
I ran into this recently in an app. Not sure how I resolved so Iโll have to re-review and apply this tip.
What I found particularly annoying is that when you click on the View button on the Inline view to see more rows, the appearance of the key column behaved differently.
For example, if I was in a Product Detail view showing the line_item Inline table, when I click View to go to the full-screen view to see more rows, I want the Product column to show as a reminder of what Product was being looked at (yes it is needed).
In the Detail viewโs Inline table, I donโt really need to see the Product because Product is being shown in the Detail view above.
HOWEVER, what I found was the Product column would show in the Detail view Inline table but would be automatically removed from the full-screen view, where it is needed the most. I believe the behavior should be reversed. I think I ended up creating a โdisplayโ column to get around the issue.
But maybe this approach will resolve that problem as well?
|
|
V
I tried various show_if expressions to try and force it to show up, none worked (TRUE
, CONTEXT("View") = ""
โฆ)
This reminds me of how drill-down Group By
s work, once you click one of the groupings you canโt see which group you are in anymore. Iโd hazard a guess that the same mechanism is in place here for fullscreen filtered inline tables.
Iโd also say this is a completely separate issue and should be posted in a separate thread. I also have a Feature Request that may fix the same issue, if it turns out to be related to groupings.
Yup.
Been there. Done that! Should I have mentioned it?