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.
Movable Date Range in Criteria defining Relationship
5 posts
• Page 1 of 1
Posts: 27
Joined: Fri Sep 08, 2006 6:26 pm Location: Oregon |
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
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 |
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 |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
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 |
Thanks John.
Data Type was set wrong on the calculation. Marvin |
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests