I'm new to PowerApps, I have two functions sorting, and pagination.
Let's assume my gallery named "Gallery_1", datasource named "datasource", and column named "likes".
1. Sorting is based on number of likes:
SortByColumns('datasource',"likes",If(SortDecending,Descending,Ascending))
2. Paging function from https://www.spguides.com/power-apps-gallery-pagination/
LastN(
FirstN(
'datasource',
varPage
),
RoundDown(
Gallery_1.Height / Gallery_1.TemplateHeight,
0
)
)
Functions work independently, however I'm not sure how to combine these two functions.

Report
All responses (
Answers (