Difference between revisions of "Key Stats Procedures"

From All n One's bxp software Wixi

Jump to: navigation, search
(Created page with " == 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...")
 
 
(7 intermediate revisions by 2 users not shown)
Line 12: Line 12:
 
* Mass_HiddenObject
 
* Mass_HiddenObject
 
* Form_Calendar_View
 
* Form_Calendar_View
 +
* Div_Table_Export
 +
* Div_Email_Export
 +
  
 
=== Js_Client_Conversion ===
 
=== Js_Client_Conversion ===
Line 17: Line 20:
 
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:
 
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
+
* UserName
 
* Status
 
* Status
 
* Department
 
* Department
 
* Role
 
* Role
* Cost Center
+
* CostCenter
 
* Email  
 
* Email  
  
Line 27: Line 30:
  
  
i.e. Username,Status,Department,Role,CostCenter,Email
+
i.e. UserName,Status,Department,Role,CostCenter,Email
  
  
Line 34: Line 37:
 
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:
 
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:
  
 +
<syntaxhighlight lang="text">
 
BXP Table Name
 
BXP Table Name
 
[[##SEP##]]Fields (separated by ,'s)
 
[[##SEP##]]Fields (separated by ,'s)
 
[[##SEP##]]Where clause Order by clause group by clause Limit
 
[[##SEP##]]Where clause Order by clause group by clause Limit
 +
</syntaxhighlight>
  
 
Example
 
Example
 +
 +
<syntaxhighlight lang="text">
 
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
 
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
 +
</syntaxhighlight>
  
  
Line 46: Line 54:
 
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
 
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
  
 +
<syntaxhighlight lang="text">
 
BXP Form Name
 
BXP Form Name
 
 
[[##SEP##]]Event Description field
 
[[##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
 +
</syntaxhighlight>
  
[[##SEP##]]Event start date time field
 
  
[[##SEP##]]Event end date time field
+
Example
  
[[##SEP##]]Allow click through to record
+
<syntaxhighlight lang="text">
 +
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
 +
</syntaxhighlight>
  
[[##SEP##]]alternative start date
 
  
[[##SEP##]]Field that contains event colour code
+
=== Div_Table_Export ===
  
[[##SEP##]]Where clause Order by clause group by clause Limit
+
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.
  
 +
<syntaxhighlight lang="text">
 +
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
 +
</syntaxhighlight>
  
 
Example
 
Example
  
 +
<syntaxhighlight lang="text">
 +
objTest
 +
[[##SEP##]]80%
 +
[[##SEP##]]50px
 +
[[##SEP##]]Master_Button
 +
</syntaxhighlight>
  
CDA_8
 
  
[[##SEP##]]strCDA_8_field_0_1
+
=== Div_Email_Export ===
  
[[##SEP##]]strCDA_8_field_0_3
+
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.
  
[[##SEP##]]strCDA_8_field_0_4
+
<syntaxhighlight lang="text">
 +
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
 +
</syntaxhighlight>
  
[[##SEP##]]true
+
Example
  
[[##SEP##]]2015-07-05
+
<syntaxhighlight lang="text">
 +
objTest
 +
[[##SEP##]]80%
 +
[[##SEP##]]50px
 +
[[##SEP##]]Master_Button
 +
</syntaxhighlight>
  
[[##SEP##]]strCDA_8_field_0_9
+
Also the following hidden HTML element needs to appear on the page:
  
[[##SEP##]]WHERE strCDA_8_field_0_5 = 'True' Order BY intCDA_8_Id Group By strCDA_8_field_0_12 Limit 10
+
<syntaxhighlight lang="text">
 +
<input type="hidden" name="keyStatsEmailTable" id="keyStatsEmailTable" value="" />
 +
</syntaxhighlight>

Latest revision as of 12:43, 6 May 2016

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="" />