Mobile: Show first X records in List Widget. (Structured Data from API)

Mobile: Show first X records in List Widget. (Structured Data from API)

  

Hi,

I am trying to show the first X records in an List (mobile) widget, but don't know how this is managed with structured data coming from a Rest Call (API). The data is not stored or saved locally or in a staging table and is not supposed to be. The data is coming directly from the API. 

Is there a way to show the first records and to create a button to view all search results (with received structured data)? There are no such properties with the List records when the source is a structured list (so no aggregate).

Regards,


Hi Martijn,

Ideally, the REST API has some parameters for returning paginated data or limit the number of items returned. In case it returns just everything, what's the problem with displaying everything in the List?

As a workaround, you can use a ListFilter to get the first X items: e.g. filtering on CurrentRowNumber < 100 gets the first 100 items.

Hi Kilian,

Thanks for your reply! I sort on "popularity" so most of the time the relevant records should show up first. With showing the first 9 records the app will be cleaner to look at. Unfortunately the ListFilter is not working with the solution you proposed;

GetSpotifyArtistAlbum.Result.Artists.Items.CurrentRowNumber < 10

Maybe I am doing something wrong here?

I'm trying to figure out how to filter and sort structures without having to put the records in a "staging table".
What I did now to fix it; is to create 2 REST Calls. First search with Limit of 9  and to view more by pressing a button to call the other REST Call with a limit of 18. It kind of solved the situation, but not the most beautiful way I think. Because now one sees 1 list of the first 9 records and when you want to view more, the list will generate again but with 18 records. 

The ideal situation would be that that results 10 to 18 will only appear underneath the already called 9 results. 

Have a great weekend!

"The ideal situation would be that that results 10 to 18 will only appear underneath the already called 9 results. "

I used the offset in the REST api. That will do the job.