# Loading data with ember infinity model

**URL:** <https://discuss.emberjs.com/t/loading-data-with-ember-infinity-model/18569>\
**Category:** Uncategorized\
**Created:** [February 2, 2021, 12:17pm UTC](https://discuss.emberjs.com/t/loading-data-with-ember-infinity-model/18569 "2021-02-02T12:17:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeshma](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@Jeshma](https://discuss.emberjs.com/u/Jeshma)\
**Post date:** [February 2, 2021, 12:17pm UTC](https://discuss.emberjs.com/t/loading-data-with-ember-infinity-model/18569/1 "2021-02-02T12:17:22Z")

</div>

Hi all,

I have some code to load data using infinityModel in my route. Once I get the data from the API I have some more code that needs to be executed, essentially I need to reformat the data from the api. Ex.

1. return this.InfinityModel(‘user’, . …).then(users =\> {
2. 

```
//Some code here

```

3. })

For testing, the perPage is set to 4 and there are 8 records. First 4 records are fetched and the entire code gets executed(1 to 3 lines in the above example).

Then when I scroll down in the UI, the api call is made and the next set of records are retrieved, however the extra code line 2 - “//Some code here” does not get executed.

Is there a way to get the entire block of code to execute rather than just loading the subsequent set of data.
