How to configure pagination for custom list in service portal?

Ankita Kolhe
Tera Contributor

Hi Community,

 

I'm new to service portal and don't have any idea to how to configure pagination for a custom list which has 100 of records. It should show only 10 records per list.

 

I have gone through all community posts related to pagination but it's not working and I'm not sure how to customise the widget as well.

 

Can someone please help on the same?

Any response would be appreciated.

 

Thanks,

Ankita

 

 

 

3 REPLIES 3

Community Alums
Not applicable

Hi @Ankita Kolhe ,

 

Can you please try solution in this post-

https://www.servicenow.com/community/in-other-news/service-portal-pagination-widget-using-choosewind...

 

take a look at this youtube video- https://www.youtube.com/watch?v=yRfkD0P7swE

 

If my response has resolved your query, please consider giving it a thumbs up ‌‌ and marking it as the correct answer‌‌!

 

Thanks & Regards,

Sanjay Kumar

 

serviceportal #servicenow #portal #serviceportal #search Service Portal D25 - Create Custom List Widget with Pagination Today I will discuss how can we create a list widget and implement pagination ...

Hi @Community Alums ,

Thanks much for response.

But the custom list is displaying data retrieved from integration,instead of a table.

 

So can you please help me how to configure pagination for the data retrieved from integration.

 

Thanks

Hi @Ankita Kolhe 

I found solution for this. Just use "Pagination Component"
https://developer.servicenow.com/dev.do#!/reference/next-experience/xanadu/now-components/now-pagina...
In my case I have client state parameter "offset" which controls my REST request and it's controlled by event "Pagination control selected page set" where I defined script like this:

function evaluateEvent({
    api,
    event
}) {
    return {
        propName: "offset",
        value: (event.payload.value * 10)
    };
}

Also this "offset" client state is used as input in "Data resource".

Regards
Mikołaj Morski