3 Replies Latest reply on Jan 31, 2011 9:54 AM by philmodjunk

    Newb's Data Difficulty - Can anyone help?

    MikeTaylor

      Title

      Newb's Data Difficulty - Can anyone help?

      Post

      I'm new to this Database development business, so please be aware my understanding of terminology may be limited.

      My enquiry is how to auto fill fields from another record & table, I'll ellaborate.

       

      I have two tables,

      "Stock" & "Dispatch".

      "Stock" contains three fields "Product Name", "Product Code" & "Job Number" with the values entered in them.

      "Dispatch" has the same fields,

      In the form for "Dispatch" I have create a dropdown list to fetch the "Product Name"s from the "Stock" table.

      When selecting a "Product Name" from the dropdown in the "Dispatch" form, I would like it to copy accross the corresponding "Product Code" & "Job Number" from the "Stock" Table into the "Dispatch" Fields.

      They need to be (i think it is termed) Static values (ie. not change with the parent field) 

      Can anyone help?

      Kind regards

      MT head :)

       

        • 1. Re: Newb's Data Difficulty - Can anyone help?
          Abhaya

          Hi,

           In Dispatch form  after fill  the product name from the dropdown list  add a script trigger(on object exit)

          scripts steps:

          set field( target field,calculation result)...for product code

          set field( target field,calculation result)...for job number

          In the calculation field jsut put the function lookup and mention there the field where the data is to be bring.

          OR

          write a script:

          set var(x= produnt name)

          go to stock

          perform find with product name

          set var(y,product code)

          set var(z,job number)

          go to original layout

          set field (product code,y)

          set field (job number,z)

          the whole script is attached by trigger(on object exit) in product name field

          • 2. Re: Newb's Data Difficulty - Can anyone help?
            MikeTaylor

            Thanks for this, I'll Give that a go,

            I'm not familiar script writing I will have to learn quickly it seems.

             

            Cheers

            MT

            • 3. Re: Newb's Data Difficulty - Can anyone help?
              philmodjunk

              No script should be necessary for this.

              If you have this relationship:

              Stock::Product Code = Dispatch::Product Code

              Then you can use the Looked Up Value field option for Dispatch::Job Number and Dispatch::Product Name to copy this data from the corresponding fields in Stock.