3 Replies Latest reply on Apr 17, 2012 11:33 AM by philmodjunk

    Find all records for current year



      Find all records for current year


      I have a drop down trigger script (FM11Pro)that finds records for spectified years, I want to include a 'find all records for current year' by calculating the current date but I'm not sure how to go about it.

        • 1. Re: Find all records for current year

          Are you having problems with the values in the drop down list or your script?

          Are the values from a custom value list or do you have a value list with the "specify values from a field" option?

          Or do you just want a button you can click to "find this year's records"?

          • 2. Re: Find all records for current year

            Try this as a script

            set variable $_year = "*/*/" & year(get(currentdate))

            Create a perform find script step --

            perform find

             Click on DateField and in the text box enter $_year

            save the setup


            The two step find for this year should work or need revising a bit...

            • 3. Re: Find all records for current year

              I prefer this form of the same script

              Enter Find mode []
              Set field [Yourtable::YourDateField ; Year ( get ( CurrentDate ) ) ]
              Set Error Capture [on]
              Perform Find[]

              It's a few more steps, but makes it much easier to see what criteria is being specified when you review the script at a later date. (Don't have to open up the perform Find step to see what was specified.)

              But it's only one possible solutions for what Gavjuan is requesting.

              It's also possible to set up a value list of years based on the data entered into this same table and thus it will update to list every year for which there is at lest one record in the table--including the current year.