1 Reply Latest reply on May 7, 2009 1:40 AM by Orlando

    Loading fields from another database by filling in one field

    b3nelson

      Title

      Loading fields from another database by filling in one field

      Post

      I currently have a production setup db that I need to bring in info from a materials db (all in FM). I want to be able to enter a material number in and bring up the fields that correspond with that material. This seems too simple but I cant figure it out.

       

      2nd Question if you feel like superman...

       

      I also want to have a Print button in one layout and have it print a different layout... hows that done?

        • 1. Re: Loading fields from another database by filling in one field
          Orlando
            

          Hi b3nelson and welcome to the forum.

           

          The first question involves setting up a relationship between the two tables, go to the relationship graph in Define Database and create a join between your Main table and a MATERIALS and link these two fields

           

          MAIN                                Main_MATERIALS

          Material Number    --=--    _UniqueID 

           

           

          Once that is done to list all related records you just need to place a portal on your layout using the portal tool and select the fields you wish to display.

           

          With regards to your second question, you need to setup a script to achieve this. First create you print layout and then go 'Scripts > Manage Scripts...' and click '+New' bottom left.

           

          And using the list of script steps on the left do the following:

           

          #
          Go to Layout [ PrintLayout ]
          Print Setup [ ] Setup as your require, portrait landscape stc.
          Print [ Current Record ] and again explore the options to suite your needs.
          Go to Layout [ Original Layout ]
          #

           

          This will print the form and then return the user to where they started. If you want them to preview the form first you can add a Pause [ Indefinately ] step before the Print step, this will then print when the user hits 'Continue' or the enter key.

           

          I hope this helps.