on 2020 Sep 24 2:35 AM
Hi,
I am trying to implement a solution for our users where a Lumira app will contain two different cross tabs, one with pixel based scrolling enabled and one without. Then depending on the state of the datasource (data volume) I want to dynamically switch between the two different cross tabs in the UI. This is for a Generic Analysis style app where I will not know exactly which query a user is running, or the navigation state they have for the query.
If they are displaying a datasource in a navigational state where the record volume is low then I want them to be able to use the pixel based scrolling cross tab as this provides a far better user experience when scrolling (our users are coming from BEx Web Analyser and so the HATE the scrolling performance of the Lumira Crosstab). If they are accessing a large query though, they will have to revert to the standard Crosstab and the page based scrolling.
So far I have tried using the following code in a datasource on results changed event:
// Get all dimensions across the rows
var rowDims = DS_1.getDimensions(Axis.ROWS);
// Create empty selection JSON
var sel = Convert.stringToDataSelection();
// Loop through dimensions and add to the selection JSON
rowDims.forEach(function(dimension, index) {
sel[dimension.name] = ["*"];
});
// Return selection array based on above selection
var dataArray = DS_1.getDataSelections(sel);
// Return the number of rows in the Crosstab (including results rows)
APPLICATION.log("Total rows: " + dataArray.length);
The issue with the above is that it hits a "Too Much Data" error which I can't seem to catch once the row count is too high when trying to perform DS_1.getDataSelections(sel); and at that point it returns zero.
Secondly, although this approach does give an accurate row count (with success well up into the thousands), I was hoping there might be a better way to just get the cell count from a datasource.
Request clarification before answering.
Very cool approach - unfortunately I have no better idea 😞 .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 18 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.