1 Reply Latest reply on Feb 19, 2015 10:50 AM by philmodjunk

    Calculation Field for Invoice Dates



      Calculation Field for Invoice Dates


      Have set-up a Inventory Database. I have a Work Order layout that I would like to run reports off of how old invoices are and then place the invoice totals.

      For example  If (Work Orders::Date of Work Order <= 30; "30 days or less"; Work Orders::Cost)


      When I enter in the above formula it doesn't limit the cost to just the invoice 30 days or less. Any suggestions would be helpful. Would ideally like a 30 or less, 60 or less, 90 or less. 

        • 1. Re: Calculation Field for Invoice Dates

          A date field stores a date as an integer that counts the number of days from 12/31/0000 to the date displayed in the field. So comparing the value to 30 will not produce the desired result as no date that you enter into this field will have a value that small.

          Work Orders::Date of Work Order + 30 > Get ( CurrentDate )

          is more in line with what you want here, though this would need to be defined in an unstored calculation field.

          Note that you can use a script like this to find all such records in work orders without using a calculation Field:

          Enter Find mode [ ]
          Set field [Work Orders::Date of Work Order ; ">" & Get ( CurrentDate ) - 30 ]
          Set Error Capture [on]
          Peform Find [ ]

          This will be faster than searching for a value in an unstored calculation field

          For more examples of scripted finds of this type, see: Scripted Find Examples

          Caulkins Consulting, Home of Adventures In FileMaking