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
20 replies
Subscribers
9 subscribers
Views
4205 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi I have a scenario wherein I am displaying data in my drop down by
komalc3
A Score Level 1
over 9 years ago
Hi
I have a scenario wherein I am displaying data in my drop down by fetching the values from DB via. query rule or query entity. Now I want to display data in the drop down in a sorted form and I am not using sorting in my query rule or the a!sortInfo in the paginInfo of my a!query entity. Is there a way I can do it?
Thanks in advance.
OriginalPostID-208782
OriginalPostID-208782
Discussion posts and replies are publicly visible
Parents
0
Rahul Gundu
over 9 years ago
Go through below example, Using todatasubset() , a!pagingInfo() we can sort the query result.
load(
local!cdt_queryData:{
{name:"CBC",id:1},{name:"DBA",id:2},{name:"ABC",id:3},{name:"BBC",id:4}
},
local!sortedData:fn!todataSubset(local!cdt_queryData,a!pagingInfo(startIndex:1,batchSize:-1,sort:a!sortInfo(field:"name",ascending:true))),
a!dropdownField(
choiceLabels:index(local!sortedData.data,"name",{}),
choiceValues:index(local!sortedData.data,"id",{}),
placeholderLabel:"Select"
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Rahul Gundu
over 9 years ago
Go through below example, Using todatasubset() , a!pagingInfo() we can sort the query result.
load(
local!cdt_queryData:{
{name:"CBC",id:1},{name:"DBA",id:2},{name:"ABC",id:3},{name:"BBC",id:4}
},
local!sortedData:fn!todataSubset(local!cdt_queryData,a!pagingInfo(startIndex:1,batchSize:-1,sort:a!sortInfo(field:"name",ascending:true))),
a!dropdownField(
choiceLabels:index(local!sortedData.data,"name",{}),
choiceValues:index(local!sortedData.data,"id",{}),
placeholderLabel:"Select"
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data