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

Report
All responses (
Answers (