5 Replies Latest reply on Apr 18, 2017 9:32 AM by philmodjunk

    How to show all records from same table in a portal

    jdevans

      I have a layout based on a table called FabOps (build-records for hardware assemblies).

       

      It is sometimes necessary to "transfer" a FabOp record to it's Next Higher Assembly (NHA). So I have a popover set up to allow the user to search for the NHA FabOp record, select it, then click a Submit button to execute it. The script basically stores the origin FabOp Record, the destination Fab Op record, date, who did it, etc. in a table called Transfers.

       

      But I'm having trouble getting a portal to show ALL FabOps records when it's placed on a layout based on itself.

       

      I tried a cartesian join on a self-relationship called "Fab_Ops_lookup" (Fab_Ops  X Fab_Ops_lookup). I based the portal on the new relationship, but it shows the same record I'm on multiple times.

      fab_transfer_popover.JPG

       

      I thought cartesian would basically just show everything. But it's only showing the one.

        • 1. Re: How to show all records from same table in a portal
          philmodjunk

          A Cartesian join does show everything.

           

          Something isn't right with your portal.

           

          Your title includes the phrase "same table". Do you mean that the layout and the portal are based on the same data source table?

           

          If so, then if your layout specifies: Table Occurrence A in Layout Set up | Show Records From, then your portal must specify Table Occurrence A 2 (or whatever the name of the occurrence on the other side of your Cartesian Join). The fields must then also be from Table Occurrence A 2 and not from Table Occurrence A.

           

          What you show is typical of adding fields to the portal row from the layout's table occurrence instead of the portal's.

           

          Also check this issue:

           

          Enter layout mode and move the portal a few pixels. The fields inside the portal row should move with the portal without being first grouped with that portal. If they don't move with the portal, they are not correctly part of the portal row. Drag them away from the portal, release the mouse button and then drag them back, being careful not to release the mouse button before they are fully inside the boundaries of the portal row.

          • 2. Re: How to show all records from same table in a portal
            jdevans

            I'm investigating the filtering I have set up on the portal. I think that's the culprit.

            • 3. Re: How to show all records from same table in a portal
              philmodjunk

              That is very unlikely to produce the results shown in your screen shot.

              • 4. Re: How to show all records from same table in a portal
                jdevans

                Somehow, the original portal got all hosed up. Even after removing the portal filtering, it was still stuck showing only a single record multiple times. SO...

                 

                I drug a new portal object onto the base layout (based on Fab_Ops), and set it up to show related records from Fab_Ops_lookup, and presto it works.

                 

                So THEN in Layout mode, I opened the popover where I want it to display, removed the errant one, and replaced it with the newly created one, and it works perfectly. Not sure what it was, but somehow, FM was corn-fused.

                • 5. Re: How to show all records from same table in a portal
                  philmodjunk

                  More likely, it was doing exactly what it was set up to do and not what you wanted it to do. ;-)

                   

                  But since you've deleted the original and replaced, you've fixed the problem that way the issue is now moot.