[FX.php List] Portal vs 2nd query [Was: Related Records]
Derrick Fogle
derrick at fogles.net
Tue Mar 21 12:14:25 MST 2006
In FM7/8, the relationship structure allows you to have a portal to a
related table, and also show data from relationships that are farther
down the line, or closer to the source table. One of my applications
is a typical Many-Many relationship: each Job can have multiple
Clients, and each Client can have multiple Jobs. So there's a join
table in between that also has information about client roles and such.
In FM, my layout is showing records from the Job. on that layout, I
have a portal that shows all the related client link records from the
linking table. But I'm only showing a couple fields from that
particular table. The client linking table is, of course, also
related to the client table, and most of what is seen in that portal
is data coming from the client info table.
It's not a portal in a portal, but it's actually pretty trivial to
create that appearance in FX.php. In your instance, you need to
create a portal on a layout whose native table is Business, that
shows the ContactPhone table data. In that portal, you can also show
the Contact data because it's in the relationship chain. So you have
few extra Contact fields in the portal that shows ContactPhone, and
that Contact data might be the same for all the portal records. Make
sure the portal is sorted so that the contact information comes
through in order.
Once you've got this data in FX.php, use PHP variables to suppress
the duplicated information in your loop. If you need some help with
that code, let me know.
Thanks,
On Mar 21, 2006, at 12:37 PM, Joel Shapiro wrote:
> So are you able to display a portal within a portal? Or are you
> using a GetNthRecord calc field in the Child records to show the
> Grandchildren records within the Child portal? Or are you doing
> something else magic??
Derrick Fogle
derrick at fogles.net
More information about the FX.php_List
mailing list