Movable Date Range in Criteria defining Relationship

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 27
Joined: Fri Sep 08, 2006 6:26 pm
Location: Oregon
PostPosted: Wed Feb 20, 2008 10:05 am
The contactactivitysimple shows all activity for the contact. When multiple future activities are scheduled, the portal becomes currently meaningless. I would like to show the activity over a week starting three days ago and ending three days from today. Is there a way to define a new table occurrence, with a date range, so that only those activities for that contact that have occurred over the last three days or will occur in the next three days (a seven day range that included today)?

I hope that makes sense.
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Feb 20, 2008 5:44 pm
Good idea Marvin.

I might actually change the ContactActivity relationship, rather than creating a new table occurrence. I've begin by creating a new global text field in Filters; something like "ShowThisWeek". Then create two new calcs in Contacts:

ContactDateFrom_k_Calc would be: if ( Filters::ShowThisWeek = "Yes" ; Get ( CurrentDate ) -3 ; Date ( 1 ; 1 ; 1968 ) )

ContactDateTo_k_Calc would be: if ( Filters::ShowThisWeek = "Yes" ; Get ( CurrentDate ) + 3 ; Date ( 1 ; 1 ; 2025 ) )

Then add two new criteria to the ContactActivity relationship like this:

ContactDateFrom_k_Calc <= ApptDateEndCalc_k
ContactDateTo_k_Calc >= ApptDateStart_k

This way, when you have ShowThisWeek set to "Yes" you'll see the contact's activities for your six day range, and when it is set otherwise you can see all the contact's activity.
John Sindelar
SeedCode
Posts: 27
Joined: Fri Sep 08, 2006 6:26 pm
Location: Oregon
PostPosted: Fri Feb 22, 2008 12:55 pm
Thanks John.

I have tried this, but nothing seems to be coming through the new filtered relationship. I made the change to the CotactActivity Simple relationship as well with the same results.

I have tested my if statement calcs and they evaluate to similar date terms, so that should not be an issue.

How do I trouble shoot this?

Marvin
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Fri Feb 22, 2008 1:00 pm
I'd check to make sure your calcs are returning the type Date. If that doesnt help, remove the second date operator and perhaps change the first one to =

HTH
John Sindelar
SeedCode
Posts: 27
Joined: Fri Sep 08, 2006 6:26 pm
Location: Oregon
PostPosted: Fri Feb 22, 2008 1:54 pm
Thanks John.

Data Type was set wrong on the calculation.

Marvin

Return to SeedCode Calendar

Who is online

Users browsing this forum: No registered users and 2 guests

(855) SEEDCODE
[email protected]
Follow us: