4 Replies Latest reply on May 13, 2015 9:38 AM by philmodjunk

    Get Last Date a checkbox was checked

    shortstreetamp

      Title

      Get Last Date a checkbox was checked

      Post

      I have a database where field technicians log in and check boxes (boolean field) to mark specific types of maintenance (different fields) for specific sites (from a drop down value list). I would like to create fields that house a calculation that when a site is selected, fields populate for each type of maintenance indicating the date maintenance was last performed (last checked the checkbox). I've come up with some long messy solution but all have big problems. Any help would be greatly appreciated! Thanks!

        • 1. Re: Get Last Date a checkbox was checked
          raybaudi

          This calculation returns the date when a checbox is checked:

          Let(
          trigger = YourCheckboxField ;
          Get ( CurrentDate )
          )

          • 2. Re: Get Last Date a checkbox was checked
            philmodjunk

            In many solutions, each time you check off such a task, you'd be updating a new record in a table such that you have a "history" recorded of each time a particular maintenance task was performed.

            • 3. Re: Get Last Date a checkbox was checked
              shortstreetamp

              That is about what I have, but I need to get the date the task was performed (specific field), not the date the entry was made (current date). Sometimes they are the same, sometimes not. I also need to be able to get that date for that specific site as opposed to the last time that maintenance was performed anywhere. 

              • 4. Re: Get Last Date a checkbox was checked
                philmodjunk

                but I need to get the date the task was performed (specific field), not the date the entry was made (current date). Sometimes they are the same, sometimes not.

                Then you need a date field in that table where the user is required to enter the date. It can, if you wish, auto-enter the creation date but still be editable so that different dates can be entered when the creation date is not the correct date to use.

                I also need to be able to get that date for that specific site as opposed to the last time that maintenance was performed anywhere. 

                Then you need to either record the site in a different field of the same record or use a relationship to link that record to a record in a table of sites. Either way, you can then specify the site in a find, in a relationship match field, in an SQL query or in a portal filter to get the date or dates that this task was performed at a given site.