Hi All,
I'm less than two weeks of working with SAIL and I have a paging grid on my interface (which is working as I want to). Very happy about that, thanks mostly to the support I have received from this forum. However, I need to include a different Paging Grid using a different data source into the same interface. In the example code I used for the first Paging Grid (see SAIL code below), I defined the query for the grid data source in the with() function of the interface. What I am now trying to find out is if I can have a second query defined in my with() so I can use for my second grid, and where I might place it (getting errors that I cannot us multiple datasubsets). If not, how might I created a second Paging Grid and also define a query from a CDT as the data source for the second Paging Grid?
Thanks.
---
=load( local!pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 20 ), with( local!datasubset: a!queryEntity( entity: cons!CSHV_LINE_ITEM_CDT, query: a!query( selection: a!querySelection(columns: { a!queryColumn(field: "itemName"), a!queryColumn(field: "amount"), a!queryColumn(field: "qty"), a!queryColumn(field: "total"), }), filter: a!queryFilter( field: "cashAdvnaceId.id", operator: "=", value: ri!CashAdvanceData.id ), pagingInfo: local!pagingInfo ) ), ...
...
Discussion posts and replies are publicly visible
As the other users have said, the main takeaway here is that "local!pagingInfo" and "local!dataSubset" are just variable names and could be renamed to anything else. One practice I find helpful is to name my paging infos according to the data type they will be paging. So if I have a form with one grid of documents and one grid of contracts, for example, I will name my variables local!documentPagingInfo and local!contractPagingInfo, and name my datasubsets similarly.