2 Replies Latest reply on Sep 15, 2010 8:52 AM by philmodjunk

    AutoFill depending on value in range

    JasonHyde

      Title

      AutoFill depending on value in range

      Post

      Hi,

      I am struggling with creating an autofill type field based on another fields value. I'll explain.

      I enter a date in to field1, I also have records that have this structure:

      Range1 - Start Date, End Date

      Range2 - Start Date, End Date

      So if my date entered is within Range1 I would like field2 to autofill to Range1's Label. Each range is unique and does not overlap, so there is no conflict. It's a tracking problem - I need to know where something is depending on the date it was created.

      Anyone suggest a solution?

      Cheers,

      Jason.

        • 1. Re: AutoFill depending on value in range
          sunmoonstar.13

          In addition to what you've described, I presume you also want field 2 to show Range 2's label if the date in field 1 falls within the second date range? If so, then try this:

          Set up field_2 as an unstored Calculation field with this basic calculation:

           

          Case ( field_1 ≥ range_1_start_date and field_1 ≤ range_1_end_date ; "Range_1_label" ;

          field_1 ≥ range_2_start_date and field_1 ≤ range_2_end_date ; "Range_2_label" )

           

          What will happen is this:

          If the date in field_1 falls within Range 1, then field_2 will return the text "Range_1_label".

          If the date in field_1 falls within Range 2, then field_2 will return the text "Range_2_label".

           

          Nick

           

          • 2. Re: AutoFill depending on value in range
            philmodjunk

            This calculation need not be unstored.