Creating a hypercube
You can create your own callback function for a hypercube.
Do the following:
-
Select to display the right panel of the Mashup editor.
-
On the Hypercubes accordion, click Create.
-
Select the Dimensions radio button and then select the applicable fields from the list.
In this example we use the dimension Priority.
-
Select a measure by selecting the Measures radio button and then select the applicable measure from the list.
You can also create a measure by clicking the button in the Measures field. This opens the Expression editor.
In this example we create the following measure: Sum([Case Count]).
-
If applicable, define Mode, Suppress Zero and Suppress Missing.
In this example we chose to suppress missing values.
-
Define your callback name.
In this example we call it CaseCountByPriority.
-
Go to the *.js tab and confirm that the callback has been generated.
In this example it looks as follows.
//create cubes and lists -- inserted here -- app.createCube({ "qInitialDataFetch": [ { "qHeight": 20, "qWidth": 2 } ], "qDimensions": [ { "qLabel": "Priority", "qLibraryId": "hyeGht", "qNullSuppression": true, "qOtherTotalSpec": { "qOtherMode": "OTHER_OFF", "qSuppressOther": true, "qOtherSortMode": "OTHER_SORT_DESCENDING", "qOtherCounted": { "qv": "5" }, "qOtherLimitMode": "OTHER_GE_LIMIT" } } ], "qMeasures": [ { "qDef": { "qDef": "Sum([Case Count])" }, "qLabel": "Sum([Case Count])", "qLibraryId": null, "qSortBy": { "qSortByState": 0, "qSortByFrequency": 0, "qSortByNumeric": 0, "qSortByAscii": 1, "qSortByLoadOrder": 0, "qSortByExpression": 0, "qExpression": { "qv": " " } } } ], "qSuppressZero": false, "qSuppressMissing": true, "qMode": "S", "qInterColumnSortOrder": [], "qStateName": "$" },CaseCountByPriority);
And also confirm that an empty callback function has been generated.
//callbacks -- inserted here -- function CaseCountByPriority(reply, app){}
-
Create your callback code in the empty callback function.
You have now created a new hypercube that you can use in your mashup project.