Birthday date find

Support, Questions and Suggestions for the FM7 Version of CC Calendar.
Posts: 25
Joined: Sat Aug 12, 2006 2:34 am
PostPosted: Thu May 17, 2007 4:58 am
Hello again,

Can anybody help me in finding if any of my contacts have a birthday coming up in the next 7 days or so, in my clients file I have a birthday date field and I would like to run a script that goes and searches for upcoming birthdays then goes to a new layout showing me all matching records.

Thanks,

roy
SeedCode Staff
SeedCode Staff
Posts: 2756
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Thu May 17, 2007 5:57 am
Sure. This is a bit easier if you have a clac that transforms the birthday into their "next" birthday for searches. Something like:

Let ( [
d = Get ( CurrentDate ) ;
bd = Date ( Month ( BirthdayField ) ; Day (BirthdayField ) ; Year ( d ) )
] ;

if ( bd < d , Date ( Month ( bd ) ; Day ( bd ) ; Year ( d ) + 1 ) ; bd )

)

Then you can script a date range find by having your script go your contact's layout, enter find mode, and then use InsertCalculatedResult to insert something like the following into the birthday calc field above:

Get ( CurrentDate ) & "..." & Get ( CurrentDate ) + 7
John Sindelar
SeedCode
Posts: 25
Joined: Sat Aug 12, 2006 2:34 am
PostPosted: Thu May 17, 2007 6:21 am
Thanks John,

always the right response so quickly.

I'm almost bald trying to work that one out!!!

Many thanks again.

Roy

Return to CC Calendar (FM7/8)

Who is online

Users browsing this forum: No registered users and 1 guest

cron
(855) SEEDCODE
support@seedcode.com
Follow us: