Is there a way to make a portal display in columns instead of rows?
For each task, I want to display data from 2 periods. Easy with a portal. However my boss wants a column for period one and a column for period 2.
You'll want to use calculation fields, or possibly calculated repeating fields. Since you already have the data coming from a linked table, you could use something like:
period_one = Getvalue ( period::field_1, 1 ) & ¶ & Getvalue ( period::field_2, 1 ) & ¶ & Getvalue ( period::field_3, 1 ) & ¶ & Getvalue ( period::field_4, 1 )
period_one = Getvalue ( period::field_1, 2 ) & ¶ & Getvalue ( period::field_2, 2 ) & ¶ & Getvalue ( period::field_3, 2 ) & ¶ & Getvalue ( period::field_4, 2 )
If its one field then using a repeating calc can makes sense.
Let ( r= Get ( CalculationRepetitionNumber ); Case ( r ≤ Count ( period::ChildID ); GetNthRecord ( Extend ( period::field_1 ); r ) ) )
But when dealing with multiple fields, it just makes more sense to use multiple portals. Why bother creating multiple calcs?
The technique described here (displaying the records in two side by side portals) can be made to work for you.
When you place the portals on your layout, in the portal setup dialog for the left portal choose initial row: 1 and number of rows: 88. For the right hand portal, select initial row: 89 and number of rows: 88. That will allow you to display 176 rows of related records in two columns. You can modify these settings to get any number of columns of any number of different sizes to suit your needs.
Thanks! I figured that out. Now, there are some records with no information in that particular field. I can't seem to find an option to omit records that have no data in that field. Any ideas? Whats happening is I have a lot of blank space and I need to move the names up, omitting the blanks.
If this is a need for a printed/PDF'd report, you might be able to use Format | Set Sliding/Printing... to make the fields slide up.
Otherwise, you'd need to modify the portal's relationship to filter out the "blank" rows.
Here's an example:
Define a calculation field in the PortalTable, cnonBlankFlag:
If (IsEmpty (field 1 & Field 2) ; "" ; 1 ) /* list your fields in place of field 1, field 2... */
Define a calculation field in the parent table, cNotEmptyFlag:
1 /*enter just the number 1 as the expression for this field */
Update the relationship that links the portal's table occurrence to the main table occurrence to include these two fields:
Maintable::KeyField = PortalTable::KeyField AND
MainTable::cNotEmptyFlag = Portaltable::cnonBlankFlag
The first pair of fields represents whatever fields you already use in your relationship. Double click the relationship line and add the second pair of fields to enable the portal to filter out blank portal rows.
I would like to pick up this old thread because I have a similar issue.
For different years (in lines - 1 record per year), I have numbers in different columns.
I would now like to show this info with the years as "columns" and thus see the different column information each between each other.
How could I achieve this using multiple portals?
Thanks in advance for your input!
Retrieving data ...