2 Replies Latest reply on Apr 6, 2010 2:47 PM by sly_1

    payment days past due



      payment days past due


      Hello me again,


      i have a table that handles all payment information. (payment date, payment amount, payment type and so on)

      what i would like to do  is create a script that will take todays date subtract payment date from all records and give me how many days its been since there last payment.


      so i can run a report on 30 60 90 120 150 180 days.


      fm10 advanced



      Thank you



        • 1. Re: payment days past due

          Howdy sly,


          You sure you want a script to do this calculation?  Why not just a calculation field?


          A calc field resulting in a number, defined as Get(CurrentDate) - Table:: PaymentDate should do the job, no?


          The trick will be how to identify the LAST payment date.  If this is not already in your bag of tricks, check out the Last( ) function and the Min( ) or Max( ) functions and see which is more appropriate to your design.


          Things that come to mind as possibilities are:

          Get(CurrentDate) - Last (Table:: PaymentDate)

          Get(CurrentDate) - Max(Table:: PaymentDate)   or

          Min ( Get(CurrentDate) - Table:: PaymentDate )

          • 2. Re: payment days past due

            that worked liked a charm

            once again very much appreciated ninja