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
4 replies
Subscribers
7 subscribers
Views
1776 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hi, I have created a view as below. select column1, column2 from
prasadr875
over 9 years ago
Hi,
I have created a view as below.
select column1, column2 from table order by column2 desc, column1
In the Interface I have used query entity to get the data from the view. In phpmyadmin I can see the data in sorted format but in the grid the data is not sorted properly.
paginginfo is a!pagingInfo(startIndex: 1,batchSize: - 1)
what is the error?
OriginalPostID-142169
OriginalPostID-142169
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 9 years ago
1. Does your CDT has a field marked as @Id? (even if it's a view you need to mark a field as the primary key)
2. Does that column contain only unique values?
3. Your paging info doesn't have any sorting. See how sorting can be done at Appian:
forum.appian.com/.../Grid_Tutorial.html
local!pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: 20,
sort: a!sortInfo(
field: "expenseDate",
ascending: false
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
prasadr875
over 9 years ago
Use case is I need to sort based on the three columns, also provide the functionality to select and resort after clicking on the column header.
1. I cannot sort on three columns on query entity
2. If I use todatasubset to sort on three columns then as soon as I select any record in grid I loose my sorting.
Please suggest any alternate approach.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sachinr
over 9 years ago
You have to declare field property of each a!gridTextColumn used to create Grid with data field and redefine your pagingInfo as
local!pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: cons!FSLS_GRID_BATCH_SIZE,
sort: a!sortInfo(
field: "Id",
ascending: false
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
prasadr875
over 9 years ago
requirement is to sort on three columns and when they select the order in grid field it should not change the sorting but it should change when they click on the column name. Above piece of code will not work.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel