Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
pablinho
Partner - Contributor II
Partner - Contributor II

Qlik sense Mashup getMoreData Example of use

Hi, i can't figured out how to use correctly the getMoreData method; anyone has an example of how to use it? I have tried to use the example that i found in the sense-developers but i get an error. How have i to combine the code of this method with the code of gedata method?

code of getMoreData method:

<button ng-if="fieldMonth.rowCount>fieldMonth.rows.length" qva-activate="fieldMonth.getMoreData()">More</button>


code of getData method:

var myField = app.field("Month").getData(); myField.OnData.bind( function(){ myField.rows.forEach(function(row){ console.log(row.qElemNumber); }); });


Thanks

2 Replies
ErikWetterberg

Hi,

What error do you get? When does it happen?

Erik Wetterberg

pablinho
Partner - Contributor II
Partner - Contributor II
Author

hi, i get the error "Cannot read property '0' of undefined";

i have changed the rows of the getData method in this way:

$scope.months = app.field("myfield").getData();

$scope.months.OnData.bind( function(){

...

});

and the getMoredata in this way:

<button ng-if="months.rowCount>months.rows.length" qva-activate="months.getMoreData()">More</button>

In this way it show in the correct way the first rows but when i click the more button i get that error

what am I doing wrong? I'm not an expert of angularjs