1 2 Previous Next 16 Replies Latest reply on Jan 7, 2015 6:29 AM by DawnKrueger_1

    How do I stop a countdown field once date is entered?

    DawnKrueger

      Title

      How do I stop a countdown field once date is entered?

      Post

      I have a field to be flagged with a highlighted color with a countdown date if 4 days before due date.  Once date is entered in the field, the highlighting disappears.  But how do I stop the countdown once I enter a date into the field.  Countdown still continues even once date is entered please see example -21 and -22 would like for there to be nothing in field once date is entered.

        • 1. Re: How do I stop a countdown field once date is entered?
          philmodjunk

          How do you compute the count down? ?

          If you use If ( IsEmpty ( DateField ) ; Get ( CurrentDate ) - Due Date )

          The calculation will be empty when you enter a date into the Date field.

          • 2. Re: How do I stop a countdown field once date is entered?
            DawnKrueger

             Thank you Phil.  One more question how do I make the count only calculate on a Monday through Friday basis and leave weekends out?

            • 3. Re: How do I stop a countdown field once date is entered?
              philmodjunk

              That sounds a bit too simplistic. Won't you also need to omit holidays from this count down as well?

              • 4. Re: How do I stop a countdown field once date is entered?
                DawnKrueger_1

                 Hi again Phil, tbh I am new to FIlemaker and taking it one day at time, still trying to learn the little things, Lol.  But yes that would be wonderful if I could exclude holidays as well as the weekends.  Ty

                • 5. Re: How do I stop a countdown field once date is entered?
                  philmodjunk

                  The issue here is that holiday closures greatly complicate the process as they are not something you can allow for in a simple calculation. You have to set up a system that records which dates you are closed. But once you've done that, the same system for logging holiday closures can log week end closures automatically and then you can use the same system for both.

                  So had I just shared a calculation that omits weekends that can be found in the knowledgebase, It wouldn't be the final version you need anyway.

                  Set up a table with at least three fields: Date, ClosureStatus. Weekly (Date, Text, Number)

                  Create a record for each day of the calendar year far enough into the future that you can account for all of the due dates you are likely to set. Set ClosureStatus to "Open" for every record you will be open. Set Weekly of a closed record for a weekly date to 1 to "mark" it as a repeating closure so that a script that updates this "calendar" table can use that info to automatically mark "closed" your week end dates. (there are other methods, but this is most flexible as an organization that is open Saturday, but closed Monday can also use this method.)

                  Define a relationship from your table of Due Dates to this Closure Calendar similar to this:

                  DueDates::DateDue < ClosureDates::Date AND
                  DueDates::constOpen = ClosureDates::Status AND
                  DueDates::cToday = ClosureDates::> ClosureDates::Date

                  This matches to all Open closure dates from Today to the date due.

                  constOpen is a calculation field with "Open" as its sole term.
                  cToday is an unstored calculation field with Get ( CurrentDate ) as its sole term.

                  This calculation then computes the days you are open over that range: count ( ClosureDates::Date )

                  If you are hosting this file from FileMaker Server, a server schedule can run a script each night to update the ClosureDate table by adding new date records and automatically closing those that are specified as closed every week. A user would periodically update these records to record which days will be a holiday closure.

                  The following calendar file could be adapted to make it easier for users to use to record those closures: https://www.dropbox.com/s/e8d03xvwe8vtz85/Calendar.fp7

                  The "event" table in this example would be the "closureDate" table I describe in this post.

                  • 6. Re: How do I stop a countdown field once date is entered?
                    DawnKrueger_1

                     Hello I have used the calculation Due Date - Get (Current Date) which worked for me as in getting the countdown dates.  But the countdown continues to house a number once a due date is entered.  Please see example:

                    • 7. Re: How do I stop a countdown field once date is entered?
                      philmodjunk

                      But why would you not want it to continue computing a value once a due date is entered? wink

                      I think that you mean that you want the count down to stop once a date completed is entered into a date completed field.

                      If you want the count down to be blank once a date completed has been entered:

                      If ( IsEmpty ( DateCompleted ) ; Due Date - Get (Current Date) )

                      If you want the count down to stop, but still show a value:

                      If ( IsEmpty ( DateCompleted ) ; Due Date - Get (Current Date) ; Due Date - Date Completed )

                      • 8. Re: How do I stop a countdown field once date is entered?
                        DawnKrueger_1

                        I have made it so the printing completed date refects 3 days minus the day due this is why it reads 7 days until due.  But the bindery is as scheduled with the due date, being Printing needs to be completed first.

                        Due Date 1/12/2015                     Days Until Due

                        Printing Completed 12/11/2015              7

                        Bindery Completed 12/11/2015             10

                        How do I get the days until due to clear once a date is entered into the Printing and Bindery completed dates.  I tried the  If ( IsEmpty ( DateField ) ; Get ( CurrentDate ) - Due Date ) but didnt work.  TY

                        • 9. Re: How do I stop a countdown field once date is entered?
                          DawnKrueger_1

                           Thank you, but which field should I put the calculation in?  The Printing completed and Bindery Completed fields or the days until due field?  sorry for so many questions I am still beginning to learn the program.

                          PS...yes I am looking for the count down to be blank once a date completed has been entered  TY

                          • 10. Re: How do I stop a countdown field once date is entered?
                            philmodjunk

                            The calculation should be its own field that returns the number of days between the two dates. This would not be any of the due date or "completed date" fields. 

                            If you have more than one "completed" date field it will be up to you to decide which field works for the count down that you are computing. In theory you can set this up for multiple pairs of "date due-completed date" fields if you want a count down for different milestones within a single project.

                            • 11. Re: How do I stop a countdown field once date is entered?
                              DawnKrueger_1

                              So I created another field and named it printing countdown and added the calculation of If ( IsEmpty ( printing completed ) ; Due Date - Get (Current Date) ) but the field still showed a number instead of being blank once date was entered.  Sorry :( am I using the correct calculations properly?

                              • 12. Re: How do I stop a countdown field once date is entered?
                                philmodjunk

                                This should be set up in an unstored calculation field. Not an auto-enter calculation in a number field not a stored calculation field. (Click storage options from the specify calculation field.)

                                Is it set up that way?

                                • 13. Re: How do I stop a countdown field once date is entered?
                                  DawnKrueger_1

                                   YES!!!! it worked thank you thank you thank you, Ugghhh all because I needed to create that other field.  You are the best.

                                  • 14. Re: How do I stop a countdown field once date is entered?
                                    DawnKrueger_1

                                    I am currently using the If ( IsEmpty ( DateField ) ; Get ( CurrentDate ) - Due Date ) calculations to countdown from the due date.  I have difference fields I am using in my database:

                                    Printing which needs to be completed before going to Bindery (I am trying to have the printing date be due 3 days prior.  Bindery is fine with the normal countdown) Can I just add a numberal at the end of the calculation as in -3 etc?

                                    I hope I didn't confuse you :)

                                    1 2 Previous Next