Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Suggested Answer
Replies
22 replies
Answers
1 answer
Subscribers
9 subscribers
Views
13807 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
need a function to sort a cdt by a date/time field. Is there such a function to
nitas811
over 11 years ago
need a function to sort a cdt by a date/time field. Is there such a function to do that? ...
OriginalPostID-88128
OriginalPostID-88128
Discussion posts and replies are publicly visible
0
Mike Cichy
Appian Employee
over 11 years ago
Nita, did you download and install the app? The rule allows you to specify the sorting attribute of your pagingInfo object that then in turn can be used to create a dataSubset object. Example todatasubset({2, 1, 3, 4, 5}, pagingInfoFromRuleObject).data will get you the sorted integer array.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nitas811
over 11 years ago
I need to know what is paginginfo object. I have a cdt and need to sort that.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nitas811
over 11 years ago
any update on this? I need to know what is paginginfo object. I have a cdt and need to sort that.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Cichy
Appian Employee
over 11 years ago
forum.appian.com/.../Data_Types
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nitas811
over 11 years ago
this is different from what i am doing, I need to sort a cdt is it possible to do that?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Patty Isecke
Appian Employee
over 11 years ago
The following example shows how you can take your pagingInfoObject that has been returned by your query rule and sorts on the field called "createdOn":
Name: getNotesForCaseIdSortedByCreationTs
Rule input 1: caseId (Number (Integer))
Rule input 2: pagingInfo (Any Type)
Definition:
=if(isnull(ri!pagingInfo.sort),
getNotesForCaseId(ri!caseId,
{startIndex: ri!pagingInfo.startIndex,
batchSize: ri!pagingInfo.batchSize,
sort: {field:"createdOn", ascending:false()}
}
),
getNotesForCaseId(ri!caseId, ri!pagingInfo)
)
You can also choose the sort the result returned by your query rule. Please see
forum.appian.com/.../Rules
for more information
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nitas811
over 11 years ago
I don't have a query rule. My cdt is generated as part of the flow. Do I need to store the info in db to be able to sort it?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Patty Isecke
Appian Employee
over 11 years ago
How are you retrieving the values for your paging grid?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nitas811
over 11 years ago
I don't have paging grid. I am cdt in email using ncolumntable. I want to sort the cdt before displaying it.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nitas811
over 11 years ago
Mike any update on this?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
<
>