Personal tools

Log in

Changes

From All n One's bxp software Wixi

Jump to: navigation, search

Keystats - Looping Engine

264 bytes removed, 14:42, 1 May 2015
no edit summary
The looping engine of Key Stats should be used in conjunction with the numerous dynamic replacements that bxp key stats module provides or with the user specified custom replacements.
The looping engine greatly enhances the reporting ability of any Key Stats report by enabling the creation of 100% dynamic and customisable reports, that could meet any user needs. When creating the a Key Stats Report an using the looping engine, there are two loop types are your disposalavailable: ''Outer Loop'' and ''Internal Loop'', you are able to have as many . The number of ''Outer Loops'' in the report are as required and also have as many , same with ''Internal Loops'' but . However, every ''Internal Loop'' cannot have another ''Internal Loop'' inside of it.
When adding loops to a Key Stat report, the loops can be added at two levels i.e , ''Tab level'' and ''Graphic level''.
In coding terms the looping engine of the bxp Key Stats module handles the same as the conventional ''FOR loop'' , i.e . Loop the following for X times.
When creating an Outer Loop in a bxp Key Stats report, there are three required pieces of syntax required:
1) [Loop_Start] -- This alerts the looping engine of Key Stats to the start of an Outer loop section in the report
2) [Loop_End] -- This alerts the looping engine of Key Stats to the end of an Outer loop section in the report
3) [##X##] -- This tells the looping engine of key Stats that the contents of the current Outer loop should be looped X times
Anything in between the Start and End Loop tags will be repeated the set number of times specified, the . The looped content can be anything: HTML, JavaScript, Key Stats, Internal Loops , or even the entire Key Stats report.
When creating an Outer Internal Loop in a bxp Key Stats report, there are three required pieces of syntax required:
1) [Internal_Loop_Start] -- This alerts the looping engine of Key Stats to the start of an Internal loop section in the report
2) [Internal_Loop_End] -- This alerts the looping engine of Key Stats to the end of an Internal loop section in the report
3) [##X##] -- This tells the looping engine of key Stats that the contents of the current Internal loop should be looped X times
'''* NOTE: ''' There should never be an Internal Loop Inside inside an Internal Loop, the . The looping engine of Key Stats will not allow an internal loop to have an internal loop
Anything in between the Start and End Loop tags will be repeated the set number of times specified, the . The looped content can be anything: HTML, JavaScript, Key Stats, Internal Loops or even the entire Key Stats report.
<syntaxhighlight lang="html4strict">
When creating a Graphic Key Stats your are able to , perform the same looping options as above, but instead of adding the looping syntax to the Key Stat Tab, the syntax gets added to the actual KeyStat that is rendering generating the graphic. The same Key Stat syntax is used for both the Outer and Internal Loops.
<syntaxhighlight lang="html4strict">
== Dynamic Replacements ==
The Key Stats looping engine of bxp allows for the user use of dynamic replacements, these . These dynamic replacements allow for you to include the current count of the loop. The current loop count can be replaced as many times as required.To perform this replacement the following key words should be used:-
1) [[LoopCount]] -- This gets replaced with the current loop count for Outer loops
2) [[Internal_LoopCount]] -- This gets replaced with the current loop count for Internal loops
When using the user set dynamic replacements ''keyStatsCustom'', you can modify the parameters inside an SQL statement. For example, for example if you had the statement that counts the number of contacts (CCL's) that happen happens between two dates but , by using the Looping engine th the report is set up to allow an indefinite amount of dates to be passed in. Instead of creating a different key stat for every iteration of the parameters, you can use the one key stats , but replace the parameters that gets passed to it. To use the dynamic replacements for the parameters passed in you need to , use the foollowing syntax (but make sure it is the very last parameter passed to the key stat:
7,528
edits