1 Reply Latest reply on Nov 20, 2009 9:04 AM by philmodjunk

    Using a Drop Down Menu to look up info in column 1 and populate a value in column 2

    Dannyboy

      Title

      Using a Drop Down Menu to look up info in column 1 and populate a value in column 2

      Post

      Greetings!
      I have an entry form that has a drop down menu driven by a value list from a smaller database. [the value list has 2 columns of info; The drop down selection [model purchased]  and a numeric value [Price] in column 2 next to it. The 2 columns of data are the only contents of the smaller database.

      e.g.,  

      Column 1                     Column 2
      Lenovo Desktop            1229.50

      Dell Desktop                 1329.50

      Apple iMac                   1199.00 

       

      I need the drop down to pull the column 1 info and show in the "model purchased" field of the entry form [I know how to do that], and the price to be automatically entered into and second field on the entry form named Price from column 2  [Here's where I need some help].

       

      Thanks! 

       

       

        • 1. Re: Using a Drop Down Menu to look up info in column 1 and populate a value in column 2
          philmodjunk
            

          Two options exist depending on how you need this to work. both approaches require the same relationship using your value list formatted field as a key linking it to the table where you store the data for your value list.

           

          TableOccurrence1:: DropDownField = TableOccurrence2::Column1Field

           

          Option 1:

          Simply use the field tool to add the TableOccurrence2::Column2Field to your layout next to your drop down field. When you select an item from this list, the matching value in this field automatically appears. This is the best approach if you want any changes to the data in the value list table to automatically appear on your layout.

           

          Option 2:

          Since this is an item's price, it's possible that you don't want existing records to show a change in price everytime you change the prices in your value list table. In this case, you define a field in the TableOccurrence1 table and use the Lookup feature found in the field's auto-enter options to copy the number from your value list table.