4 Replies Latest reply on Apr 4, 2012 6:58 AM by TafeLoursen

    How to make a layout ?? I have a database in which I have following tables Projects...

    TafeLoursen

      Post

      How to make
      a layout ??

       

      I have a
      database in which I have following tables

      • Projects
      • MediumStore
      • SubContractors
      • SubContrProjekcts
      • SubContrInvoices

       

      Each
      Project in the Project-table can have use for several Subcontractors.

      Each
      Subcontractor can work on several Projects in Project-table

       

      How shall I
      construct my layout for connecting a SubContractor to a specific Project ?

      I enclose a
      picture of my relation diagram where I can handle the green and yellow tables  but the red ones is the problem for the
      moment.

       




       
       
       
       
       
       
       
       
       
       
       
       




       

       

      RedRelations.jpg

        • 1. Re: How to make a layout ?? I have a database in which I have following tables Projects...
          philmodjunk

          If, in the future, you crop your screen shot before uploading it, others will be better able to read it.

          You have a classice many to many relationship.

          A contracter can be lined to many projects and a project can be linked to many contracters. Thus, the first problem to resolve is not the design of your layouts, but the design of your relationships to enable such a set of relationships. You need a join table so that you can link projects to contracters like this:

          Contractors-----<Contractor_Project>-------Projects

          Contractor::__pk_ContractorID = Contractor_Projects::_fk_ContractorID
          Projects::__pk_ProjectID = Contractor_Projects::_fk_ProjectID

          With these relationships, a portal to the join table (Contractor_Project) can be placed on the Contractors layout to list all Projects assigned to that contractor. Fileds from Projects could be added to such a portal's row to fill in details about each project. In similar fashion, a portal to the join table can be placed on the Projects layout to list all contractors assigned to that project with additional fields from Contractors added to the portal row to list details about each contractor.

          Here is a demo file that illustrates such a many to many relationship for linking events to contacts. The "basic set up" layout in this demo file is what I have just outlined for you. There are additional layouts and scripts in this file that demonstrate more sophisticated methods of working with such a set of relationships:  http://www.4shared.com/file/dZ0bjclw/ManyToManywDemoWExtras.html

          • 2. Re: How to make a layout ?? I have a database in which I have following tables Projects...
            TafeLoursen

            Thank You for a good tutorial file but I still have a proble perhaps because of my working with my programs.

            If I build a layout with the table Projects as base and want to see each project one at the time I also want to use a Value list to extract the project I want to be shown and not by toggling on the picture of a book at the left of the screen.

            In my specific case I started to ask for above I therefore want to use two Value lists on the layout - one for choosing amongst the projects I have registred and one Value list showing the subcontractors to choose between.

            So my question is:

            Is there a standardized way of creating a Value list showing one single post from the table the layout is based on ?

            I have earlier used Microsoft Access and perhaps are my questions to You influenced by the MS Access way of thinking and therefore I have difiiculties to change to another way of thinking.

            I hope I can change my way of thinking and reduce the amount of questions in the future.

            Best regards

             

            Tafe Loursen

             

            • 3. Re: How to make a layout ?? I have a database in which I have following tables Projects...
              philmodjunk

              You need a workable table structure (I'd have set up the same tables in Access if I were using that product), first before trying to tackle the remaining issues.

              If I build a layout with the table Projects as base and want to see each project one at the time I also want to use a Value list to extract the project I want to be shown and not by toggling on the picture of a book at the left of the screen.

              You can define a global field and set it up with a value list that lists all project ID's and/or Project Names. A script trigger such as OnObjectSave can then be used to use this data to perform a find to pull up the Project Record you want to see.

              Enter Find Mode[]
              Set field [Projetcts::ProjectName ; Projects::globalProjectName ]
              Set Error Capture [on]
              Perform Find []

              Is an example of such a script that searches for project records by name. (If you use a value list of names, you can enable the auto-complete option to make selecting a name from a long list of project names go faster.)

              • 4. Re: How to make a layout ?? I have a database in which I have following tables Projects...
                TafeLoursen

                Thank You for Your tip.

                 

                For the moment I have a layout I am pleesed with

                Have a good Easter (unless I won´t be back before then)

                 

                Tafe Loursen