3 Replies Latest reply on Jan 21, 2010 10:45 AM by philmodjunk

    Help!!! Question About Data Sharing Between Layouts

    boopboopdydoop

      Title

      Help!!! Question About Data Sharing Between Layouts

      Post

      I HAVE FIVE DIFFERENT LAYOUTS. THE MAIN LAYOUT IS CALLED PRODUCT LIST. NOW ALL MY LAYOUTS ARE LINKED THROUGH A MODEL # (OR ATLEAST THEY ARE SUPPOSED TO BE...NOT SURE IF I DID THAT PART RIGHT). THROUGH THAT MODEL # I WOULD LIKE TO ACCESS INFO FROM THE DIFFERENT LAYOUTS AND HAVE IT SHOW UP IN THE MAIN LAYOUT (PRODUCT LIST). FOR EXAMPLE: I HAVE A LAYOUT CALLED STANDARD FEATURES. WHEN I TYPE IN THE MODEL # IN THE PRODUCT LIST LAYOUT I WOULD LIKE FOR THE TEXT BOX LABELED "STANDARD" IN THE MAIN LAYOUT TO SHOW THE CORRESPONDING INFORMATION FROM THE STANDARD LAYOUT ACCORDING TO THAT MODEL #. HOW DO I DO THAT?

       

      THANKS!!!

       

      Edit note: Eliminated the "shouting capitals" from the subject line.

        • 1. Re: Help!!! Question About Data Sharing Between Layouts
          philmodjunk
            

          You'll need to keep in mind that layouts and tables are two different things. You can have any number of different layouts that all display information from the same table.

           

          Open Manage | Database | Tables

           

          How many tables are listed there?

          Click the relation ships tab. How many "boxes" (Called table occurrences) are there?

          Are they linked? How?

          • 2. Re: Help!!! Question About Data Sharing Between Layouts
            boopboopdydoop
              

            There are 5 tables (products, pictures, drawings, standard, and options). There are 5 table occurrences. This is how they are linked:

             

            product::model# = options::model#

            product::model# = standard::model#

            product::model# = drawings::model#

            product::model# = pictures::model#

             

            What should I do next?

             

            Thanks.

            • 3. Re: Help!!! Question About Data Sharing Between Layouts
              philmodjunk
                

              You have various options. You can use a portal to display related records from one table on another layout.

               

              For example, you could place a portal to Pictures on your Product layout and all related pictures for a given product record can be displayed in the portal.

               

              You can also write scripts so that when you move from one layout to another, the records with matching records are "found" and displayed on the other layout. You can attach those scripts to a button.

               

              A simple script to show all drawings for the current record on the product layout:

               

              Set Variable [$Model; Product::model#]

              Go To Layout ["Drawings" (Drawings)]

              Enter Find Mode[]

              Set Field [drawings::model#; $Model]

              Set Error Capture [on]

              Perform Find[]

              If [ get ( foundcount ) = 0 /* no drawing records were found */]

                Show Custom Dialog ["No drawings were found"]

              End If