Difference between revisions of "PanelStatistics class"

From Catglobe Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{CGscriptClass_Template
 
{{CGscriptClass_Template
|Name=PanelStatistics
+
|Name=<nowiki>PanelStatistics</nowiki>
|Description=The panel statistics collection. To view information like how big a panel is, how it is used etc.
+
|Description=<nowiki>The panel statistics collection. To view information like how big a panel is, how it is used etc.</nowiki>
 
|Constructors=
 
|Constructors=
 
{{CGscriptConstructors_Template|Parameters=
 
{{CGscriptConstructors_Template|Parameters=
{{CGscriptParameters_Template|Type=array|Name=questionnaireResourceTemplateRId|Description=Restricts the questionnaires examined to these types of questionnaires|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=bulkmailResourceTemplateRId|Description=Restricts the count of mails sent to those sent from these types of bulkmail|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=groupRId|Description=Resource id of group containing all panel members|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=from|Description=From date|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=to|Description=To date|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=groupBy|Description=Return results in these groupings. 1=Week, 2=Month, 3=Quarter, 4=Year|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=panelCreationQuestionnaireResourceId|Description=If >0 then the endodate of qas in this questionnaire is used for creation date, otherwise the user created date is used}}
+
{{CGscriptParameters_Template|Type=array|Name=<nowiki>questionnaireResourceTemplateRId</nowiki>|Description=<nowiki>Restricts the questionnaires examined to these types of questionnaires</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>bulkmailResourceTemplateRId</nowiki>|Description=<nowiki>Restricts the count of mails sent to those sent from these types of bulkmail</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>groupRId</nowiki>|Description=<nowiki>Resource id of group containing all panel members</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>from</nowiki>|Description=<nowiki>From date</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=array|Name=<nowiki>to</nowiki>|Description=<nowiki>To date</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>groupBy</nowiki>|Description=<nowiki>Return results in these groupings. 1=Week, 2=Month, 3=Quarter, 4=Year</nowiki>|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=<nowiki>panelCreationQuestionnaireResourceId</nowiki>|Description=<nowiki>If >0 then the endodate of qas in this questionnaire is used for creation date, otherwise the user created date is used</nowiki>}}
|Description=Create new statistics}}
+
|Description=<nowiki>Create new statistics</nowiki>}}
 
|Methods=
 
|Methods=
{{CGscriptMethods_Template|ReturnType=array|Name=CountActive|Description=Number of panel members that started a qas.}}
+
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountActive</nowiki>|Description=<nowiki>Number of panel members that started a qas.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=CountCompletedInterviews|Description=Number of panel members that completed a qas.}}
+
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountCompletedInterviews</nowiki>|Description=<nowiki>Number of panel members that completed a qas.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=CountCreated|Description=Number of panel members that was created.}}
+
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountCreated</nowiki>|Description=<nowiki>Number of panel members that was created.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=CountDisabled|Description=Number of panel members that was disabled.}}
+
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountDisabled</nowiki>|Description=<nowiki>Number of panel members that was disabled.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=CountEarnedPoints|Description=Number of points panel members earned}}
+
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountEarnedPoints</nowiki>|Description=<nowiki>Number of points panel members earned</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=CountGotInvitation|Description=Number of panel members that received an invitation.}}
+
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountGotInvitation</nowiki>|Description=<nowiki>Number of panel members that received an invitation.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=CountReadInvitation|Description=Number of panel members that read an invitation. This number depends on emails using the tracking feature, and is thus subject to same inaccuracy.}}
+
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountReadInvitation</nowiki>|Description=<nowiki>Number of panel members that read an invitation. This number depends on emails using the tracking feature, and is thus subject to same inaccuracy.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=CountTotal|Description=The number of panel members excluding disabled and deleted.}}
+
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountTotal</nowiki>|Description=<nowiki>The number of panel members excluding disabled and deleted.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=CountUsedPoints|Description=Number of points panel members used. Included points spent on shopping and subtracted for going back in a questionnaire.}}
+
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountUsedPoints</nowiki>|Description=<nowiki>Number of points panel members used. Included points spent on shopping and subtracted for going back in a questionnaire.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=CountUsedPointsOnOrders|Description=Number of points panel members used for shopping.}}
+
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>CountUsedPointsOnOrders</nowiki>|Description=<nowiki>Number of points panel members used for shopping.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=DetailsActive|Description=Panel members started how many qas.}}
+
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsActive</nowiki>|Description=<nowiki>Panel members started how many qas.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=DetailsCompletedInterviews|Description=Panel members completed how many qas.}}
+
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsCompletedInterviews</nowiki>|Description=<nowiki>Panel members completed how many qas.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=DetailsCreated|Description=Panel members that was created.}}
+
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsCreated</nowiki>|Description=<nowiki>Panel members that was created.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=DetailsDisabled|Description=Panel members that was disabled.}}
+
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsDisabled</nowiki>|Description=<nowiki>Panel members that was disabled.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=DetailsGotInvitation|Description=Panel members receive how many invitations.}}
+
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsGotInvitation</nowiki>|Description=<nowiki>Panel members receive how many invitations.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=DetailsReadInvitation|Description=Panel members read how many invitations. This number depends on emails using the tracking feature, and is thus subject to same inaccuracy.}}
+
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>DetailsReadInvitation</nowiki>|Description=<nowiki>Panel members read how many invitations. This number depends on emails using the tracking feature, and is thus subject to same inaccuracy.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=array|Name=GetGroupings|Description=The grouping values. E.g. week 32 in 2014 is returned as {32,2014}. Grouping by year is returned as {2014,2014}}}
+
{{CGscriptMethods_Template|ReturnType=array|Name=<nowiki>GetGroupings</nowiki>|Description=<nowiki>The grouping values. E.g. week 32 in 2014 is returned as {32,2014}. Grouping by year is returned as {2014,2014}</nowiki>}}
{{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}}
+
{{CGscriptMethods_Template|ReturnType=string|Name=<nowiki>ToString</nowiki>|Description=<nowiki>The string representation of the object.</nowiki>}}
{{CGscriptMethods_Template|ReturnType=number|Name=TotalAvailablePoints|Description=Sum of points panel members has available at the 'to' date}}
+
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>TotalAvailablePoints</nowiki>|Description=<nowiki>Sum of points panel members has available at the 'to' date</nowiki>}}
{{CGscriptMethods_Template|ReturnType=number|Name=TotalEarnedPoints|Description=Sum of points panel members earned}}
+
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>TotalEarnedPoints</nowiki>|Description=<nowiki>Sum of points panel members earned</nowiki>}}
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=TotalEarnedPointsBySurvey|Description=Dictionary of questionnaire id and number of points panel members earned for that questionnaire}}
+
{{CGscriptMethods_Template|ReturnType=Dictionary|Name=<nowiki>TotalEarnedPointsBySurvey</nowiki>|Description=<nowiki>Dictionary of questionnaire id and number of points panel members earned for that questionnaire</nowiki>}}
{{CGscriptMethods_Template|ReturnType=number|Name=TotalUsedPoints|Description=Sum of points panel members used}}
+
{{CGscriptMethods_Template|ReturnType=number|Name=<nowiki>TotalUsedPoints</nowiki>|Description=<nowiki>Sum of points panel members used</nowiki>}}
 
|Properties=
 
|Properties=
{{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}}
+
{{CGscriptProperties_Template|ReturnType=string|Name=<nowiki>ObjectTypeName</nowiki>|HasGetter=1|Description=<nowiki>The name of the type of object.</nowiki>}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
+
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=<nowiki>TypeInformation</nowiki>|HasGetter=1|Description=<nowiki>Get information about this class.</nowiki>}}
 
}}
 
}}
 
 
  
 
=== Examples ===
 
=== Examples ===

Revision as of 10:22, 24 April 2017

PanelStatistics



The panel statistics collection. To view information like how big a panel is, how it is used etc.

Constructors

  • (array questionnaireResourceTemplateRId "Restricts the questionnaires examined to these types of questionnaires", array bulkmailResourceTemplateRId "Restricts the count of mails sent to those sent from these types of bulkmail", int groupRId "Resource id of group containing all panel members", array from "From date", array to "To date", int groupBy "Return results in these groupings. 1=Week, 2=Month, 3=Quarter, 4=Year", int panelCreationQuestionnaireResourceId "If >0 then the endodate of qas in this questionnaire is used for creation date, otherwise the user created date is used") - Create new statistics

Methods

  • array CountActive() - Number of panel members that started a qas.
  • array CountCompletedInterviews() - Number of panel members that completed a qas.
  • array CountCreated() - Number of panel members that was created.
  • array CountDisabled() - Number of panel members that was disabled.
  • array CountEarnedPoints() - Number of points panel members earned
  • array CountGotInvitation() - Number of panel members that received an invitation.
  • array CountReadInvitation() - Number of panel members that read an invitation. This number depends on emails using the tracking feature, and is thus subject to same inaccuracy.
  • array CountTotal() - The number of panel members excluding disabled and deleted.
  • array CountUsedPoints() - Number of points panel members used. Included points spent on shopping and subtracted for going back in a questionnaire.
  • array CountUsedPointsOnOrders() - Number of points panel members used for shopping.
  • Dictionary DetailsActive() - Panel members started how many qas.
  • Dictionary DetailsCompletedInterviews() - Panel members completed how many qas.
  • Dictionary DetailsCreated() - Panel members that was created.
  • Dictionary DetailsDisabled() - Panel members that was disabled.
  • Dictionary DetailsGotInvitation() - Panel members receive how many invitations.
  • Dictionary DetailsReadInvitation() - Panel members read how many invitations. This number depends on emails using the tracking feature, and is thus subject to same inaccuracy.
  • array GetGroupings() - The grouping values. E.g. week 32 in 2014 is returned as {32,2014}. Grouping by year is returned as {2014,2014}
  • string ToString() - The string representation of the object.
  • number TotalAvailablePoints() - Sum of points panel members has available at the 'to' date
  • number TotalEarnedPoints() - Sum of points panel members earned
  • Dictionary TotalEarnedPointsBySurvey() - Dictionary of questionnaire id and number of points panel members earned for that questionnaire
  • number TotalUsedPoints() - Sum of points panel members used

Properties

  • string ObjectTypeName { get; } - The name of the type of object.
  • TypeInformation TypeInformation { get; } - Get information about this class.


Examples

array a = DateTime_getByYMD(2014,12,24); array b = DateTime_getByYMD(2015,12,24);

PanelStatistics panel=new PanelStatistics({45592},{2066},69441,a,b,1);

array CountActive=panel.CountActive();// - Number of panel members that started a survey.

array CountCompletedInterviews=panel.CountCompletedInterviews();// - Number of panel members that completed a survey.

array CountCreated=panel.CountCreated();// - Number of panel members that was created.

array CountDisabled=panel.CountDisabled()// - Number of panel members that was disabled.

array CountGotInvitation=panel.CountGotInvitation();// - Number of panel members that received an invitation.

array CountReadInvitation=panel.CountReadInvitation();// - Number of panel members that read an invitation. This number depends on emails using the tracking feature, and is thus subject to same inaccuracy.

array CountTotal=panel.CountTotal();// - The number of panel members including disabled.

array GetGroupings=panel.GetGroupings();// - The groping values. E.g. week 32 in 2014 is returned as {32,2014}. Grouping by year is returned as {2014,2014}

string ToString=panel.ToString();// - The string representation of the object.