7 Replies Latest reply on Apr 23, 2014 3:00 PM by philmodjunk

    Records not displaying in Portal



      Records not displaying in Portal


           Hi all - hope someone can help with this:

           My MainClients table is linked to Risk Policies via a ClientID field, which in turn is linked, via the PolicyNo field, to 3 further portals for Medical Cover, Income Protection and Lump Sums..

           Although the First Portal allows me to enter new records, it doesn't allow me to display any records in portals 2, 3 or 4 except for those related to the first record in portal one - if I select the 2nd record in portal one the records do not update in 2, 3 & 4 and even the copy of the Risk Policies Policy number doesn't change..

           I've just made a switch from Alpha Five so I hope it's something fairly basic that I've missed..

           Hope this makes sense - any guidance appreciated..



        • 1. Re: Records not displaying in Portal

               Can you describe your relationships in more detail? Perhaps by uploading a screen shot of the relevant portion of Manage | Database | Relationships?

          • 2. Re: Records not displaying in Portal

                 Hi Phil..

                 Thanks for your reply..

                 I've attached one image with two screenshots - the top is the relationship diagram as requested, the bottom is a very simplified version of what I'm trying to achieve..

                 Dave has 2 policies with 2 different insurance companies; each of these policies has different insurance benefits

                 The first portal shows the policy numbers and insurers. The second shows the benefits.

                 I'm trying to get the second portal to display only those benefits linked to the policy number selected in the first; but this doesn't seem to happen - even if I select the policy number via a 2nd drop down version of the policy number needed; it only ever displays the first record (of the first portal) details. 

                 If I add a filter to the benefit portal to show only records with the selected policy number; it again shows the benefit records for the first (Policy Number 11111) only..

                 If I click on the 2nd record of the first portal in order to enter a new benefit record in the second portal, it just clicks back to the 1st - the only way that I could enter the benefit information for display & testing was to go straight to direct table entry for the policy number & benefits 

                 With regards relationships: Policies is linked to Clients via Client ID, Benefits is linked to Policies via PolicyNumber.

                 Either I'm missing something obvious or FM doesn't like to display 3rd generation (ie Detail of Detail of Master) data - which would seem to defeat the purpose of a relational database.?

                 I hope it's the first - Thanks again in anticipation !

            • 3. Re: Records not displaying in Portal

                   Am I correct that XYZ company issued the life insurance in your example?

                   Filtered portals don't automatically update when a field referenced in the portal filter expression is given a different value.

                   And if you show a policy number of 1111 in the second portal row when it should be 2222, I would suggest that the field in that row of the portal is from risk instead of the portal's table occurrence.

                   But what you describe is a typical "master detail" pair of portals and you don't need any drop down field at all, just selection buttons in the row of the first portal so that you only click a button in the portal row (or the entire row if you make the whole row into a button), to see the associated records appear in the "detail" portal.

                   But this requires a simple script and different relationships. See this thread for the details: Need layout solution for nested portals...

              • 4. Re: Records not displaying in Portal

                     Hi Phil.

                     Thanks again for your help - I've been a bit like a dog with a bone with this so have found a simpler solution..

                     It seems that FM will not accept a filter on a 2nd portal for any fields in the 1st Portal (even though they're related !)..

                     so I created a new field in the main table which was updated via set field when a user clicks a field in the 1st Portal (in this case the policy number) - then added a Refresh Window..

                     The 2nd portal is then filtered via this main table field..

                     And it works..

                     Thanks again !

                • 5. Re: Records not displaying in Portal

                            It seems that FM will not accept a filter on a 2nd portal for any fields in the 1st Portal (even though they're related !)..

                       I don't see how that could possibly work. A portal, by design is for a one to many relationship. You have many records in that 1st Portal, to WHICH record in that portal would your filter expression refer to?

                       And all calculations referring to related records ignore portal filter settings as they evaluate at the data level and the portal filter evaluates at the display level.

                  • 6. Re: Records not displaying in Portal

                         Sorry Phil - I obviously never explained this well from the start..

                         The filter on the 2nd Portal was never intended to be permanent - just set to temporarily display only the records related to whichever record was selected in Portal 1.

                         In my original example - if i set the filter to display where Policy Number (Portal 2) = Policy Number Selected (Portal 1) FM didn't want to know - it either showed no records, or only those records from row 1 of the 1st Portal.

                         It was only after I added a SelectedPolicy field to the main client table and updated this based on the 1st portal record selected , that FM filtered the 2nd portal to display the selected/related records only..



                    • 7. Re: Records not displaying in Portal

                           Filtered portals do not update to show different records automatically when a value referenced in the portal filter changes. Sometimes either the refresh window [flush cached join results] script step must be executed, you include the filter referenced field in the relationship using the X operator instead of = or you don't use a portal filter in the first place--which is what I recommended in my thread on "master - detail" portals.