web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery with Paginatio...
Power Apps
Unanswered

Gallery with Pagination and Search box

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello Experts!

 

I am new to Canvas application and I am trying to create a gallery from SharePoint List where I have included Pagination and a Search box to the Gallery. I have used below formula in the Items of the gallery,

If(!IsBlank(tbSearch.Text),
Filter(MySPCollection, StartsWith(Title,tbSearch.Text)),
If(
'Gallery Pagination_1'.OutCurrentPage = 'Gallery Pagination_1'.OutTotalPages,LastN(FirstN(MySPCollection,'Gallery Pagination_1'.OutPageCounter),(InTotalItemsCount - ('Gallery Pagination_1'.OutPageCounter - 'Gallery Pagination_1'.OutItemsPerPage))),LastN(FirstN(MySPCollection,'Gallery Pagination_1'.OutPageCounter),'Gallery Pagination_1'.OutItemsPerPage) )
)

 

where tbSearch is my search box, Gallery Pagination_1 is my pagination component and MySPCollection my sharepoint list Collection.

 

When I use Search Box Pagination does not work as expected and shows the searched Item on all the Pages in pagination. Could anyone please help me in fixing the issue? I need the pagination for the searched item if there are more items returned from the search results else if there is only 1 item returned from search result, the pagination should be removed. 

 

Your help is greatly appreciated!

Thank you

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 294 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 169

Last 30 days Overall leaderboard