2 Replies Latest reply on Aug 11, 2011 8:55 AM by Matty_1

    Pulling a value from a ValueList based on another field.

    Matty_1

      Title

      Pulling a value from a ValueList based on another field.

      Post

      Hello,

       

      I have a field called Grade and a field called Grain, I also have a value list called Commodities.  The value list resembles the following:

      100 WHEAT

      102 WHEAT HVY

      200 OATS

      202 OATS HVY

      300 BARLEY

      ETC.

      What I would like to have is a calculation field that refers to the Grade.  Based on the grade it will search the value list for the corresponding value so if the Grade is 100 then I would like Grain to be "100 WHEAT"

       

      Thank you.

        • 1. Re: Pulling a value from a ValueList based on another field.
          philmodjunk

          I suspect that this is a custom value list. If so, define a new table with at least two fields, Grade, Grain.

          Create records in this table for each entry in your custom value list. Put the number in Grade and the text in Grain.

          Define your value list to list Grade in field 1 and Grain in Field 2.

          Use manage | Database | relationships to create this relationship (Use your table and field names here)

          MainTable::Grade = NewTable::Grade

          Format MainTable::Grade with this new value list. Put the NewTable::Grain field next to it on your MainTable based layout. When you select a grade in the MainTable::Grade field, the matching Grain text from the new table will automatically appear next to it.

          • 2. Re: Pulling a value from a ValueList based on another field.
            Matty_1

            Yeah this made me realize the value list method is fairly inefficient considering I could have a value list create itself based on the Grain table.  Thank you Phil.