1 Reply Latest reply on May 14, 2014 9:18 AM by philmodjunk

    Question regarding portal behavior



      Question regarding portal behavior


           I have the following relationship Platform TO LineItem TO SubSystems TO Attributes.  On my Attributes layout I create two portals.  The first is connected to Subsystems and it contains ss1 and ss2  (just as I expect).  The second portal is connected to LineItem and it contains four records (two for ss1 and two for ss2).  In the LineItem portal I put the following fields, LineItem::_kf_platform, Platform::Name, LineItem::_kf_subsystem and SubSystem::name.  The info from Platform and LineItem table display correctly.  But "ss1" displays for SubSystem::name for all records even those linked to ss2.  Why is that?

           Why does the wrong SubSystem record display on a LineItem portal? The LineItem data is being pulled through correctly but not SubSystem?  I've seen this issue a few times and would like to understand the characteristics of portals that is causing it.


        • 1. Re: Question regarding portal behavior

               It appears that you have these relationships:

               Attributes----<Subsystems-----<Lineitem?-----?Platform      (---< means "one to many", ?---? means that I can't tell what you have for a relationship).

               To fix this so that you see the correct data in your portal to LineItem, add another table occurrence of Subsystems linked using the same match fields as you have set up for Subsystems top Lineitem in your first relationship:

               Attributes----<Subsystems-----<Lineitem>----Subsystems 2

               Then add fields to your portal row from Subsystems 2 instead of Subsystems.

               The reason this happens is that FileMaker does not determine what data to put into a field from Subsystems from the context of LineItem, it makes that determination from the context of your layout's Tutorial: What are Table Occurrences?, Attributes. Thus you see data from the first related record in Subsystems linked to your current Attributes record instead of data from the first record that is realted to LineItem. By adding another table occurrence of Subsytems "downstream" from the portal's table occurrence, you get a reference that will evaluate from the correct context.

               This is why you see the expected data for Platform as it is on the "Far side" of the portal's table occurrence from that of the layout's.