In layout mode, select the layout tool, click where you want your column header text and type it in.
In layout mode, double click the field in the portal, select the create Label check box in the specify field dialog and click OK. Then drag this text to where you want it in your layout.
AND how can I get a TOTAL AMOUNT for the invoices listed in the portal. That is the TOTAL of the field AMOUNT for that contact?
Is the portal filtered? (FileMaker 11 only)
If you define a calculation field in the table your layout is based on like this:
Sum ( PortalTable::Amount ) That will compute the portal total and you can place it on your layout beneath the portal. (Use the name of your portal table's name in place of "PortalTable".
If you are using portal filter expressions, the above calculation field will not always compute the correct total as it will bypass the filter and sum all related records. If that's the case, define a summary field in your portal's table as the Total of Amount. Place a one row portal on your layout with the same filter expression just below the first portal and place this summary field in that one portal row.
how do I find out the name of my portal table?
In layout mode, double click your portal. The table occurrence name for your portal will be listed in the show records from drop down in the portal setup dialog. The table occurrence name will be the name of one of the "boxes" in your relationship graph--which is why you need that name to make sure you are using the correct relationship in your Sum function.
In the specify calculation dialog, you can type in Sum ( , then select this name from the drop down at the top, then double click the name of your amount field and both the table occurrence name and the field name will be added after the left parenthesis. Add the right parenthesis and you are done.
If you would like to learn more about table occurrences:
i created this calculation field: Sum (invoice::amount) but it only has the total for the first item in the portal list; the second is ignored in the total?
In what table did you define it?
If you have this relationship
LayoutTable::ID = PortalTable::ID
You define the calculation in LayoutTable as Sum ( PortalTable::Amount )
I defined it in the INVOICE table which has a foreign key linked to the primary key in the contact table.
So I created the calculation field in the INVOICE table: Sum (invoice::amount) but again it is not summing the items in the portal; only has the amount for the first item. I must be doing something wrong :)
i used a SUMMARY field instead of a calculation field and it worked fine!
Summary field is fine, though in some situations where you are editing data in the portal, it may not update as smoothly--which is why I prefer a calculation field that uses Sum(). Your Sum function was defined in the wrong table--that's why that didn't work. Sum ( Invoice::amount ) doesn't tell me which table it is defined in, BTW, as this could be defined exactly that way in any table in your database.
As I said in my last post, for Sum to workthewayyouneedittohere, it has to be defined in the table on which you based your layout to sum the values of the table on which you based your portal.