Hi ,
I want last three rows of dataset. What are syntax for that or do we have any function which can return filter rows ?
Discussion posts and replies are publicly visible
Hi sauravk Use below code snippet to get last three rows
index(reverse({1,2,3,4,5,6}),{1,2,3},null())
regards,Sachin
You can also try
todatasubset( local!DataSubset.data, topaginginfo( local!DataSubset.totalCount - 3, local!DataSubset.totalCount ) )
Code:
load( local!mydatasubSet:a!dataSubset( startIndex: 1, batchSize: 4, sort: a!sortInfo( field: "name", ascending: true() ), totalCount: 10, data: {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j"}, identifiers: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} ), todatasubset( arrayToPage:local!mydatasubSet.data, pagingConfiguration:topaginginfo( local!mydatasubSet.totalCount - 2, local!mydatasubSet.totalCount ) ) )
Output:
startIndex: 8 batchSize: 10 sort: List of SortInfo: 0 items totalCount: 10 data: List of Text String: 3 items "h" "i" "j" identifiers: List of Number (Integer): 3 items 8 9 10