3 Replies Latest reply on Feb 25, 2016 12:32 PM by AdamGlick

    Relating Multiples of One Portal on Same Record?

    themactech.

      I had a strange request from a department in my office. They want a database to start tracking their vessel shipping jobs and the items on those shipments. Seemed straight forward until they sent me an image of how they want it.

       

      ShippingChart.png

       

      one shipment can contain 3 containers which can contain 10 racks which can contain 4 barrels.

       

      I came up with the image below as a draft of the ERD but where I'm stuck is how to relate/show the muultiple portals of cylinders related to the selected rack on the layout. I was working on a series of slide panels for each possible Rack (using a single portal row and only showing specific rows of that portal (up to 10 racks) and then another portal below that shows the related barrel and use that same portal on each of the panels for each of the 10 racks.

       

      I just can't figure out how to make only the barrels related to that specific rack show in that portal depending on which rack they are viewing.

       

      Maybe I need to create a TO for each possible rack/barrel relationship and relate them somehow that way?

       

      ShipERD.png

       

      I'm not looking for a complete answer.. just a little guidance in how I might want to move forward on this. THANKS!!!

        • 1. Re: Relating Multiples of One Portal on Same Record?
          AdamGlick

          Shouldn't be too difficult to do. I would change your schema to this:

           

          shipping erd.jpg

          if you use multi-key joins, then you can, if needed, display just the barrels included for the shipping rec, etc.

           

          now for your UI, couple of options. You could have a clean UI that when you land on a Shipping rec, you then have a portal for Containers, limited to display just up to 3 lines. The user would create the Containers first. Then, they would select the container row - you need a script that sets the ID_Container key value and the ID Shipping key value to global fields stored in the Shipping rec. The global fields would be part of a join from Shipping to Flatrack and then the user would be able to add the flat rack records. Then, after adding the flat racks, selecting one would set an additional global in Shipping that stores the select ID_Flatrack, and activates your next join based on those 3 globals to your Barrel table, and the user can then enter Barrels for the selected Flat rack.

           

          Now, if they are insistent on having distinct portals for each Container, then you just need to create distinct globals for each TO you need to create, create the TOs and then you have the appearance of each as separate, indepenedent portals on your layout. With the benefit of everything being easily reported on.

           

          Sounds complex, but in practice its not.

          • 2. Re: Relating Multiples of One Portal on Same Record?
            themactech.

            thanks so much!! I was overthinking it a bit and I think this is the best approach!!!

            • 3. Re: Relating Multiples of One Portal on Same Record?
              AdamGlick

              glad to help! I've built a few UI's along these lines so happy to share.