We are using store procedure in the service backed record. We want to add the paging in that.
In the documentation It is given to add paging in integration call but as we are using the store procedure how to add paging.
Thanks In advance
Discussion posts and replies are publicly visible
You need to create two new parameters on SP, 1) @StartIndex 2) BatchSize
pass the value on StartIndex : local!PagingIndo.StartIndex
In the SP, You can use
OFFSET (@StartIndex -1) ROWS FETCH NEXT @BatchSize ROWS ONLY
after select, if you are using SQL Server
1.Does the rspQuery will take care of the next startIndex ? and does it mean I should fetch the paginginfo from the rspQuery into the paginginfo for query and rest will be taken care of ..?
Yes - You will get the StartIndex and BatchSize from rsp!query
2.I'm concerned as if the returned result from queryEntity exceeds limit of 1 MB even after applying all the filter..then my record might stop working in future and I may have to redesign..So should I go queryEntity way or should I use the Stored Procedure as my Data-Source in place of queryEntity..
- depend on data source (Table/View), For Table no Concerns
3.If you say I have to choose the Stored proc..then how shall I use the rspQuery to increase startIndex for paging.
Yes from rsp!query you get the StartIndex and BatchSize when user clink next/previous on Record view
© 2020 Appian. All rights reserved.