Key Stats Procedures

From All n One's bxp software Wixi

Jump to: navigation, search

1 Overview

The bxp module Key Stats has recently received an update, this update allows Key Stats report creators to create complex Sql statements and layouts by simply adding parameters to a query.


2 Procedures explained

bxp currently has the following key stats procedures added to it, with more being added all the time.

  • Js_Client_Conversion
  • Mass_HiddenObject
  • Form_Calendar_View
  • Div_Table_Export
  • Div_Email_Export


2.1 Js_Client_Conversion

This procedure draws to screen javascript functions that can be called by the report creators own JS code, to perform conversions of the clients bxp user id to the following:

  • UserName
  • Status
  • Department
  • Role
  • CostCenter
  • Email

To execute the Key stats Procedure simply set the query field to be Js_Client_Conversion" and then enter in a comma separated string for the type of JS function you wish to create into the SQL query section of the stat creation page


i.e. UserName,Status,Department,Role,CostCenter,Email


2.2 Mass_HiddenObject

This procedure draws hidden objects that have the values set to the fields of a custom sQL statement, similar to the hidden list functionality already present. However unlike the hidden list functionality were it can only generate one object to the page, this procedure can generate X objects to the page from one Key Stat. To execute the Key stats Procedure simply set the query field to be Mass_HiddenObject" and enter the following into the SQL query section of the stat creation page:

BXP Table Name
[[##SEP##]]Fields (separated by ,'s)
[[##SEP##]]Where clause Order by clause group by clause Limit

Example

CDA_5[[##SEP##]]intCDA_5_Id,strCDA_5_field_0_4,strCDA_5_field_0_5,strCDA_5_field_0_8,strCDA_5_field_0_11,strCDA_5_field_0_12,strCDA_5_field_0_10[[##SEP##]]WHERE strCDA_5_field_0_4 = 'True' Order BY intCDA_5_Id Group By strCDA_5_field_0_11 Limit 10


2.3 Form_Calendar_View

This procedure draws a calendar view to the page that displays events, all of the events must be in a form but can also be apart of the bxp appointment manager, this procedure allows for the calendar to be limited by a where clause allowing a person to view a calendar of items that are just assigned to themselves. The calendar can also be colour coded to highlight different events

BXP Form Name
[[##SEP##]]Event Description field
[[##SEP##]]Event start date time field
[[##SEP##]]Event end date time field
[[##SEP##]]Allow click through to record
[[##SEP##]]alternative start date
[[##SEP##]]Field that contains event colour code
[[##SEP##]]Where clause Order by clause group by clause Limit


Example

CDA_8
[[##SEP##]]strCDA_8_field_0_1
[[##SEP##]]strCDA_8_field_0_3
[[##SEP##]]strCDA_8_field_0_4
[[##SEP##]]true
[[##SEP##]]2015-07-05
[[##SEP##]]strCDA_8_field_0_9
[[##SEP##]]WHERE strCDA_8_field_0_5 = 'True' Order BY intCDA_8_Id Group By strCDA_8_field_0_12 Limit 10


2.4 Div_Table_Export

This procedure allows for a custom button to be drawn on screen that when clicked simply exports the contents of a div to an excel file.

Div on the page to export the contents of
[[##SEP##]]Custom width for the button
[[##SEP##]]Custom height for the button
[[##SEP##]]CSS Class to be applied to the button

Example

objTest
[[##SEP##]]80%
[[##SEP##]]50px
[[##SEP##]]Master_Button


2.5 Div_Email_Export

This procedure allows for a custom button to be drawn on screen that when clicked simply exports the contents of a div to be sent as a rich text email.

Div on the page to export the contents of
[[##SEP##]]Custom width for the button
[[##SEP##]]Custom height for the button
[[##SEP##]]CSS Class to be applied to the button

Example

objTest
[[##SEP##]]80%
[[##SEP##]]50px
[[##SEP##]]Master_Button

Also the following hidden HTML element needs to appear on the page:

<input type="hidden" name="keyStatsEmailTable" id="keyStatsEmailTable" value="" />