This topic is locked

Use where clause on calcalendar table redirected to other custome table data

3/29/2021 4:07:59 PM
Calendar Template general questions
chandoshi author

I am using Calendar template version 4.0

I am trying to use the where clause isolution in calcalendar table as suggeste in a previous solution below
In event calcalendar -> list page -> before sql query add code similar to this one:
$SESSION["strWhereClause"] = "DATESUB(CURDATE(), INTERVAL 7 DAY) <= DateField";*

In my case I am redirecting the calccalendar connection to a table called Tasks using following code in “After application initialized”.
//Redirection code
$calendarDatasourceTableNames["calcalendar"] = "calcalendar";
// mandatory settings
$calendarSettings["calendarTable"] = "Tasks";
$calendarSettings["calendarKeys"]["calendarid"] = "pkTaskId";
$calendarSettings["calendarFields"]["calendarDateField"] = "StartDate";
$calendarSettings["calendarFields"]["calendarSubject"] = "TaskName";

Where would I set the where clause - $_SESSION["strWhereClause"] = "fkCompanyId = '".$_SESSION["ActCompany"]."'";?