The Lib class is a utility class which provides custom BQL scalar and aggregate functions.
tsEvent(BTimeSchedule sched) - used to display event information for a specific BTimeSchedule. The display format is '<event state> from h:mm a - h:mm a'.
bql:select rootSchedule.displayName as 'Schedule',displayName as 'Weekday',vykonPro:Lib.tsEvent(day.time) as 'Event 1',vykonPro:Lib.tsEvent(day.time1) as 'Event 2' from schedule:DailySchedule
dsEvent(BDailySchedule sched) - used to display event information for a specific BDailySchedule. The display format is '<event state> from h:mm a - h:mm a'.
bql:select rootSchedule.displayName as 'Schedule',vykonPro:Lib.dsEvent(monday) as 'Monday' from schedule:WeekSchedule
dEvent(BDaySchedule sched) - used to display event information for a specific BDaySchedule. The display format is '<event state> from h:mm a - h:mm a | <event state> from h:mm a - h:mm a'.
bql:select rootSchedule.displayName as 'Schedule',displayName as 'Weekday',vykonPro:Lib.dEvent(day) as 'Events' from schedule:DailySchedule
wsEvent(BWeekSchedule sched) - used to display event information for a specific BWeekSchedule. The display format is '<day of week> | <event state> from h:mm a - h:mm a | <event state> from h:mm a - h:mm a'.
bql:select rootSchedule.displayName as 'Schedule',vykonPro:Lib.wsEvent(week) as 'Monday' from schedule:WeeklySchedule
showFacets(BControlPoint point) - Display the control point value in a BQL query with the facets applied.
bql:select name as 'Zone',vykonPro:Lib.showFacets(ZoneTemp) as 'Zone Temp',vykonPro:Lib.showFacets(FanStatus) as 'Fan Status',vykonPro:Lib.showFacets(Occupancy) as 'Occupancy' from baja:Folder
showFacets(BStatusValue value) - Display the value in a BQL query with the facets applied.
bql:select name,out.value,vykonPro:Lib.showFacets(out) as 'Value With Facets' from control:ControlPoint
cycles(boolean value) - used to display the number of state transitions of the boolean value in the data set. This would typically be used in conjunction with a history query while rolling up records.
history:/vykonProTest/lights?period=weekToDate|bql:select timestamp.toDateString as 'Date',vykonPro:Lib.cycles(value) as 'Total Cycles'
cycles(boolean state, boolean value) - used to display the number of state transitions of the boolean value for the specified state in the data set. This would typically be used in conjunction with a history query while rolling up records.
history:/vykonProTest/lights?period=weekToDate|bql:select timestamp.toDateString as 'Date',vykonPro:Lib.cycles(value) as 'Total Cycles',vykonPro:Lib.cycles(true,value) as 'On Cycles'
Copyright © 2000-2018 Tridium Inc. All rights reserved.