3 Replies Latest reply on Mar 29, 2010 1:28 PM by philmodjunk

    Drop-down list w/ data from 4 fields

    k1ngf1sher

      Title

      Drop-down list w/ data from 4 fields

      Post

      Hi, I've been ruminating over how to create a value list that includes the data from four different fields within the same record.  Here's the scenario:

       

      For a crop rotation, different amounts of manure are applied depending upon the particular crop in the rotation (e.g., soybeans get 4,000 gal/acre but corn gets 10,000 gal/acre).  Rotations are planned in 4-year intervals, therefore, there could potentially be four different manure amounts.  I would like to take these values (rate1, rate2, rate3, rate4) and include them in a value list.

       

      I cannot put my finger on how to do this and would appreciate any thoughts/insights on this issue.

       

      Thanks,

      K

        • 1. Re: Drop-down list w/ data from 4 fields
          philmodjunk

          Since a filemaker value list can only display data from two fields, you'll need to define a calculation field that combines these values and then use it as the data source for your value list.

           

          A calculation defined something like:

           

          rate1 & ", " & rate2 & ", " & rate3 & ", " & rate4

           

          would let you put all these values in a single column by referencing this single calculation field.

           

          Just make sure your field is set to return text instead of the default number setting.

          • 2. Re: Drop-down list w/ data from 4 fields
            k1ngf1sher

            Phil, Thanks again for the response.  I did some digging and found a solution that appears to work for the moment: I created a calculation field in my table that uses the 'List' function.  I then used this variable for my value list field.  Is there any reason you could see that might make this solution untenable?

             

            Thanks,

            K

            • 3. Re: Drop-down list w/ data from 4 fields
              philmodjunk

              If it lists the values the way you want, use it.

               

              I'd think, though that you'd get a single column of values from it unless you use the subsitute function to replace the carriage returns produced by the list function with another character.

               

              such as: Substitute ( List ( rate1 ; rate2 ; rate3 ; rate4 ; ) ; ¶ ; " " )