2 Replies Latest reply on Jun 14, 2012 10:12 AM by Marcus_1

    Update a field/calculation using current date and a future date

    Marcus_1

      Title

      Update a field/calculation using current date and a future date

      Post

      I have two date fields and two checkboxes.

      One date is the start date, where one checkbox is autochecked "T" when that date occurs.

      The other date is the end date, where the other checkbox is autochecked "T" when that date occurs.

      If the end date is past the current date, checkbox 2 is autochecked "T" regardless of any other checkbox or date.

      There's also a message field that takes that data and says the following:

      If checkbox 1 is checked, Start; If checkbox 2 is checked, End.
      If the current date is less than start date (regardless of end date), nothing is in the message.
      If the current date is greater than or equal to the start date, the message says Start.
      If the current date is greater than or equal to the start date and less than the end date, the message is the end date.
      If the current date is greater than the end date, the message changes to something like NO.

       

      I can get all of these conditions to work, on their own with two date fields, one calc field (the message) and two text fields with auto-enter calcs (the checkboxes, as they can be checked even if there's no info in either of the date fields).

      My question: Is there a way for these fields to be auto-calculated? Right now if I put tomorrow's date in the end date field the message will say that it ends tomorrow. However, the message will still say that two days from now. I can't seem to get it to recalculate on its own even though I do not have the calculations stored.

        • 1. Re: Update a field/calculation using current date and a future date
          philmodjunk

          You don't indicate how you implemented your calculations. These could be auto-entered caculations or fields of type calculation.

          Auto-entered calculations will not update when the date returned by your system clock changes.

          Calculation fields will not update if they are specified as "stored" calculations.

          If you have a calculation field, open up the calculation, click the storage options button and change it to "unstored".

          IF you have an auto-entered calculation, change the field type to "calculation" (the expression you entered will not be lost), open up the calculation and change it to "unstored".

          • 2. Re: Update a field/calculation using current date and a future date
            Marcus_1

            The date fields are both simply dates.

            The message field is an unstored calc field.

            The checkboxes are two text fields with auto-enter calcs (unstored).

            I guess I should just put in a date and wait for tomorrow to see if they have updated correctly? I did indeed just try to change my system clock (I guess I wasn't thinking very clearly).