2 weeks ago
Hi experts,
after converting my old classic analytic application to new Story OSE the following code doesnt work anymore.
Table_1.getDataSource().setRefreshPaused(false);
var membersRes = Table_1.getDataSource().getResultSet({"006EIDM3RWZJKVLQMDKLWU6MG":"39217857-8320-4345-9347-722179101763"});
console.log(memberRes);
var "memberRes" is now undefined. It seems the code now doesnt wait for the Table to be loaded. How can I fix that?
Maybe these 2 items mentioned in help files could be of any use.
Check if disabling background or viewport loading works better or set drill limit of the table to unlimited.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@JefBwow, I didnt notice that. The problem is definitely lazy loading because of RefreshPaused API.
Anyway this code helped me out and solved my problem:
Table_1.getDataSource().setRefreshPaused(false);
var maxAttempts = 100;
var attempt = 0;
while (attempt < maxAttempts) {
var membersRes = Table_1.getDataSource().getResultSet({"006EIDM3RWZJKVLQMDKLWU6MG":"39217857-8320-4345-9347-722179101763"});
if (membersRes && membersRes .length > 0) {
console.log(membersRes );
break;
}
attempt++;
for (var j = 0; j < 1000000; j++) { }
}
if (attempt === maxAttempts) {
console.log("Chart loading timed out");
}
console.log(membersRes);
User | Count |
---|---|
69 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.