1 Reply Latest reply on Jun 24, 2011 12:10 PM by aammondd

    Working with recurring appointments



      Working with recurring appointments


      I am sure the answer is in here somewher but I can't find it. I need to be able to set next service dates by manipulating the number  of months the week or the month and the da of the week from a given date. Example: Three months from now in the second week, tuesday. How do you write the formula and how do you set up the variables. Some appointments recur monthly, bi-monthly, quarterly, annually.  Thanks in advance.

        • 1. Re: Working with recurring appointments

          You will probably need to script it but you could set up a very elaborate calculation too.

          Look at the date functions in the help you can determine a number of things with them.

          You can also substring out Month Year Day etc to determine  if the addition of a number of days/months will roll into the next month/year

          If you add a number to a date field it adds days so you could use DayofWeek((datefield + $days)  For days you could use a case statement or sub script to pass in a value of 28,29,30 or 31 based on the datefields month. Month (Datefield)   

          You can use case statements to deal with the results of  the day of the week and add or subtract a day or more.

          You can get very complex with this even finding available appointment dates/times.