This topic is locked

Custim Where Clause

8/7/2018 4:43:39 PM
Calendar Template general questions
V
VORONOY author

Can any one help me to modify ListPage:Custom Query in calendar view, to add custom where clause.
Here is what I want to add:
if InStr(Session("GroupID"), "TimeSheetsBill")<1 then query.addWhere

"OwnerID='" & SESSION("OwnerID") & "' OR MgrID='" & SESSION("OwnerID") & "'"

end if
add to
Dim dateStart,dateEnd,strWhereClause,rawevents

doAssignmentByRef dateStart,db2time(calendar_getMinDateField(pageObject.connection))

if not bValue(dateStart) then

doAssignmentByRef ListQuery,CreateDictionary()

Exit Function

end if

doAssignmentByRef dateEnd,db2time(calendar_getMaxDateField(pageObject.connection))

doAssignmentByRef dateEnd,calendar_adddays(dateEnd,1)

doAssignmentByRef strWhereClause,calendar_getSearchWhereClause(pageObject)

doAssignmentByRef rawevents,calendar_getListOfEventsInRange(dateStart,dateEnd,strWhereClause,pageObject.connection)

doAssignmentByRef ListQuery,rawevents
Exit Function