5 Replies Latest reply on Nov 12, 2012 7:32 AM by philmodjunk

    Due Dates Reminders



      Due Dates Reminders


           The majority of my customers renew their contracts 120 days before the expiry dates, therefore i have set the calculation to remind me 134 days before the expiry date as shown on attached screen shot.

           However i have a small number  whose contracts need to be renewed 60 days before the expiry dates. I can identify them by the supplier we use called, say ABC in the SupplierField, Supplier. Can someone please help me with the calculation, Would it be something like,

           If(IsEmpty(CED1);Get(CurrentDate) ; CED1 - 134 ) if(Supplier= ABC); Get(CurrentDate) ; CED1 - 60 )


        • 1. Re: Due Dates Reminders

               I never use an If statement, as the Case Statement does everything If does, and is more flexible for development later.

               I would suggest:

               Case (

               IsEmpty (CED1) ; Get(CurrentDate) ;

               Supplier= ABC ; CED1 - 60 ;

               CED1 - 134


               That will check if there is any value in CED1.  If not, it sets the RDD1 to today.
               If there is a CED1 date and the Supplier is ABC it will set RDD1 to 60 days before that.
               Otherwise it will set any other records to 134 days before the CED1 date.

               I would suggest you untick the option to 'do not evaluate if all referenced fields are empty', and also in the storage options tick 'Do not store calculation results'.

          • 2. Re: Due Dates Reminders


                 The calculation you was asking about is as follows:

                 If(IsEmpty(Self) and supplier="ABC";Get(CurrentDate)+60;Get(CurrentDate)+120)

                 I see some problems using just the above formula.   If you use a calculation It auto-enters the date before the supplier can be enter or if the wrong supplier is selected.

                  I would use a script trigger onObjectModify on the supplier field, also the supplier field would need to be a drop down list. I'm sure you have a contract / invoice date.  I would let the DueDate be changed as long as todaysDate equals the contract Date. 

                 My script would then be:

                 if [contract::ContractDate=Get(CurrentDate)]

                    if [contract::supplier="ABC"]

                        Set Field [contract:ced1;Get(CurrentDate)+60]


                        Set Field [contract:ced1;Get(CurrentDate)+120]



                    Show Custom Dialog [Title "System Message";Message;"Contract can only be modified on date created"]

                    Exit Script[]




            • 3. Re: Due Dates Reminders

                   thanks a lot guys

              • 4. Re: Due Dates Reminders

                     I have managed to get a pop up window opening to display notifications of due dates using the following script,

                     New Window [Name: "Notifications";Height: 100; Width: 300]

                     Can someone please advise me how i can get the new pop up window to display only a limited amount of data from a few fields that are required for viewing.

                • 5. Re: Due Dates Reminders

                       Design a layout specifically for use with this window. Use Go To Layout immediately after New Window to select that layout for your new window.

                       To get specific records for your new window, either perform a find after opening the new window or use Go To Related Records to both pull up a found set of matching records and also open the new window in one script step.