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
3 replies
Subscribers
10 subscribers
Views
1783 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
Hello, I have one dropdown field in which data is coming from one con
tapans
over 9 years ago
Hello,
I have one dropdown field in which data is coming from one constant. The constant is containing all department values.My SAIL code is as below :
------------
a!dropdownField(
label : "Department",
choiceLabels : cons!DeptNames,
placeholderLabel : "Select a Department",
choiceValues : cons!KeyDepts,
value : ri!dept,
saveInto : ri!dept
)
------------------------------------
The department names are coming like Xyz, Abc, Pqr and so on in dropdown values. Now I want that dropdown to come with sorting. So in my case I need output like Abc,Pqr,Xyz..
How I can achieve that?
Many Thanks!...
OriginalPostID-136809
OriginalPostID-136809
Discussion posts and replies are publicly visible
0
Josh
Certified Lead Developer
over 9 years ago
You can use the Sort Utilities plugin
forum.appian.com/.../summary
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jackm829
A Score Level 3
over 9 years ago
Out of the box sorting can be achieved by casting to object form (an inline expression will do). Convert these objects to a datasubset and configure the sort parameter.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jackm829
A Score Level 3
over 9 years ago
As an example, consider:
with(
local!departments: {
{department:"Xyz"},
{department:"Abc"},
{department:"Pqr"}},
index(index(todatasubset(local!departments,
a!pagingInfo(
startIndex: 1,
batchSize: -1,
sort: a!sortInfo(
field: "department",
ascending: true
)
)
),"data",null),"department",null)
)
returns: Abc, Pqr, Xyz
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel