Silding total fields inside a portal

Wouldn't it be cool if you could always see your portal totals immediately below the last used portal row, instead of having them at the bottom of the portal?

https://www.nautilusfm.com/portaltotals

5 Likes

I gather that the fields in green are each behind of the qty and row total fields. Why do they appear on the ghost row unless the latter is hidden? They are from the layout table? Or a calculated variable?

Think of it this way, the portal is the Invoice_Items but the table you are on is Invoices. The fields that are shown in green (which is just for emphasis) are the calculated ones from the Invoices table. When you allow the creation of related records through the relationship, you will see those ‘empty’ fields in the portal, and entering anything into any of those fields creates the record. So we hide all those fields using the condition to determine if the record exists. When it doesn't, invoice_items::one ≠ 1. You now take the total fields and put them on top of the portal fields in the 1st row, using the condition invoice_items::one = 1 This means that they only show up in the ghost row. Every time you create a new invoice item, the total fields are hidden on that row and slide down to the ghost row, thus always appearing immediately after the last row of the invoice items. The totals are from the layout table and there are no variables. HTH

| Cecile
December 6 |

  • | - |

I gather that the fields in green are each behind of the qty and row total fields. Why do they appear on the ghost row unless the latter is hidden? They are from the layout table? Or a calculated variable?


Kind Regards,

Michael Rocharde

1 Like

That's a really good use for the data input row that is created when you allow creation of records across the relationship. It puts the summary data in the best position in relation to the data at all times.

thanks for the tip, @mrocharde.

2 Likes

Welcome.

This is the prime use case for a secondary ghost data entry portal (another thread on this), where a single row portal, filtered as FALSE, with create through relationship on (and hiding the ghost row in the larger portal with an IsEmpty (child::primarykey) ) allows data entry, always at the position of the one row ghost portal, be it at the top, or in a popover on an ADD button, or elsewhere.