Professional > Data management scripting > Data Management reference > Data Management functions > CreateGridSummary
 
CreateGridSummary
Creates a summary result for a grid (used for OnNextCase events).
Syntax
CreateGridSummary (Grid, SummaryVarible, SummaryCategories, QuestionNameForSummary)
Parameters
Grid
Type: None
The summarized grid question.
SummaryVariable
Type: None
The categorical question for saving summary results.
SummaryCategories
Type: None
The category list for calculating summary results.
QuestionNameForSummary
Type: Text
The name of sub-question in the summarized grid.
Notes
The function creates the summarized results for grid sub-questions and saves the results to the categorical question SummaryVariable. There can be more than one sub-question; QuestionNameForSummary is the only sub-question that is summarized.
There are restrictions when using this function:
The grid iteration categories are the same as defined categories for the categorical question SummaryVariable.
Example
CreateGridSummary (BrandsGrid, TopBrand2, {A,B}, "Rating")
BrandsGrid "BrandsGrid" loop
{
BrandA "BrandA",
BrandB "BrandB",
BrandC "BrandC",
BrandD "BrandD"
} fields -
(
Rating "Rating" categorical [1..]
{
A "_1",
B "_2",
C "_3",
D "_4",
E "_5"
};

LongRating "Rating" long [0 .. 10];

TextRating "Rating" text [10..10];

) expand grid;

BrandTop "Top 2 summary Brand" categorical[1..]
{
BrandA "BrandA",
BrandB "BrandB",
BrandC "BrandC",
BrandD "BrandD"
}
The value for BrandsGrid is as follows:
 
A
B
C
D
E
BrandA
 
 
 
BrandB
 
 
 
BrandC
 
 
BrandD
 
 
 
 
The value for the question TopBrand2 is:
{BrandA, BrandB, BrandD}
See also
Data Management functions