Community
Showing results for 
Search instead for 
Do you mean 
Reply

Creating Reoccuring Pattern for an Activity

New Member
Posts: 31
Country: USA

Re: Creating Reoccuring Pattern for an Activity

I have spent all day on this and basically gotten NOWHERE!!!! How can one make recurring patterns so difficult???

Anyway, I need to create the following recurences (basically all of them) and I am looking for code for them. Here's

a brief breakdown on the recurrences:

 

   Daily, every 1 day.
   Daily, every N days
   Weekly, on certain days of the week, for example monday, wed, and friday
   Weekly, every N Weeks, on certain days of the week, for example monday, wed, and friday
   Monthly,  every N months, on an X day of the month
   Monthly, every N Monhs, on the (first, second, third, fourth, last) Day or Weekday of the month
   Yearly, Every N Years, on a date of that year
   Yearly, Every N Years, on the (first, second, third, fourth, last) Day or Weekday of Y month

 The only recurrence that I have managed to create is Daily, Only on Weekdays. Everything else does not get registered by the ACT! Framework.

 

Thanx in advance for ANY tips and tricks

 

T

New Member
Posts: 31
Country: USA

Re: Creating Reoccuring Pattern for an Activity

[ Edited ]

I spent all day today figuring out the recurring events and finally got most of it.

For the life of me I can't seem to be able to generate a simple Daily Recurring Event that goes off every 4 days.

 

reccurspec = New Act.Framework.Activities.ActivityRecurSpec
Reccurspec.Frequency = 4

reccurspec.Month = 0
reccurspec.Period = ActivityRecurPeriod.Daily
ACT_ActivityTemplate.SetRecurSpecValues(reccurspec)

 

No matter what I do, the recurring pattern becomes a Daily Recurring Pattern that only fires during the week. Does anyone have a clue here?

Message Edited by thatch on 02-16-2009 11:37 PM
Champion Listener
Posts: 34
Country: Canada

Re: Creating Reoccuring Pattern for an Activity

I'm using this code (in C#) and it works fine for me:

 ....

recurSpec.Period = ActivityRecurPeriod.Daily;

recurSpec.Modifier = ActivityRecurModifier.None;
recurSpec.DayType = ActivityRecurDayType.Typed;

recurSpec.Month = 0;

recurSpec.Frequency = 4;

 

//for Daily - every day

recurSpec.Day = new ActivityRecurDay( ActivityRecurTypedDay.Day );

 

//for Daily - every weekday

recurSpec.Day = new ActivityRecurDay( ActivityRecurTypedDay.Weekday );

.....

 

Katerina

New Member
Posts: 31
Country: USA

Re: Creating Reoccuring Pattern for an Activity

The code works! Thanx Katerina.

 

I was doing the same thing but in a different order and it just would not work. It now works great. Thanx.

 

T