Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
9 subscribers
Views
4367 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
The sort capability isn't working on my grid, and I think it's because o
nickh413445
Certified Senior Developer
over 9 years ago
The sort capability isn't working on my grid, and I think it's because of how I'm getting the data. Any ideas on how to do this so the sort will work when a user clicks on the column header?
1. Use a!queryEntity to get a datasubset with a batchSize -1 for paging to get all the rows
2. Filter the data and put it into a datasubset with a batchSize of 10 for paging
3. Display the filtered datasubset into a grid.
Here's some sample code:
load(
local!allRowsPaging: a!pagingInfo(startIndex:1, batchSize: -1),
local!gridSelection: a!gridSelection(pagingInfo: a!pagingInfo(startIndex:1, batchSize: 10)),
with(
local!datasubset1: rule!queryEntityFunction(local!allRowsPaging),
local!filteredData: rule!filterData(local!datasubset1.data),
local!datasubset2: todatasubset(local!filteredData, local!gridSelection.pagingInfo),
a!gridField(
totalCount: local!datasubset2.totalCount,
columns:{
a!gridTextColumn(lab...
OriginalPostID-155401
OriginalPostID-155401
Discussion posts and replies are publicly visible
Parents
0
nickh413445
Certified Senior Developer
over 9 years ago
...el:"Name", field: "Name", data: index(local!datasubset2.data, "name", {})
},
identifiers: index(local!datasubset2.data, "id", {}),
value: local!gridSelection,
saveInto: local!gridSelection,
selection:true
)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
nickh413445
Certified Senior Developer
over 9 years ago
...el:"Name", field: "Name", data: index(local!datasubset2.data, "name", {})
},
identifiers: index(local!datasubset2.data, "id", {}),
value: local!gridSelection,
saveInto: local!gridSelection,
selection:true
)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data