I have a read-only grid that uses an expression rule as its data source. Now, I want to implement manual pagination. When a user clicks on the 'Next' button, it should trigger a request to the API to fetch the next set of data, which will then be displayed on the interface. Is this doable in Appian?
Discussion posts and replies are publicly visible
You need to understand the mechanics of how a grid works by default. Clicking "next page" simply saves a new value (via the "paging save into" parameter, when set up to use external paging) into the 'paging info' variable, namely the "start index", which will be simply set to the previous start index + the page size. That new start index value, in normal use cases, will trigger a re-query of data (based on Appian refreshing the queried data when the referenced paging info variable changes), which then causes the grid to update.
If you can figure out a way to trigger a data refresh based only on the Start Index being updated, then this plan might have a way of working. However I'm less sure about having it fire an API call (unless i'm reading your original scenario wrong). But if your expression rule accepts a "start index" and updating that can trigger a refresh, then that might be all you need?