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
18 replies
Subscribers
8 subscribers
Views
6049 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hi all, I'm displaying some records from a database. The data is d
phanibabuk
over 10 years ago
Hi all,
I'm displaying some records from a database.
The data is displayed properly on the grid. However, whenever I try to sort using any column, I get the following error:
Error Evaluating UI Expression:
Expression evaluation error in rule: Error evaluating function 'todatasubset': sort should not have blank sort fields.
How can I fix this?
Please provide your inputs....
OriginalPostID-105531
OriginalPostID-105531
Discussion posts and replies are publicly visible
0
Malathi
Certified Lead Developer
over 10 years ago
Check your sail code whether the field property is added in the grid Column.That is the grid column you want to sort.
Here is the wiki document link related to that,
forum.appian.com/.../Grid_Tutorial
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
phanibabuk
over 10 years ago
Hi,
The sorting works now, however, after sorting is done and when I click on one of the row in the grid, I get the following error:
Error evaluating function 'todatasubset' : The given data type is not a complex type: TypedValue[it=5,v=8]
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
phanibabuk
over 10 years ago
Hi all,
Any inputs on this issue?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
phanibabuk
over 10 years ago
Hi all,
Any inputs on my query?
Awaiting your early inputs.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
Can you paste your expression here? It seems there's a logic error in there
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
phanibabuk
over 10 years ago
Hi Eduardo,
Please find attached the SAIL expression.
Kindly provide your inputs.
SAIL for Sorting
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
phanibabuk
over 10 years ago
Hi Eduardo,
The purpose of the SAIL expression is as follows:
1. The report displays list of all users from the DB if no dates are selected.
2. If dates are selected, then it displays the users created within those dates.
3. In any case, it displays the users with columns NBID, FirstName in a grid and both are sortable by default.
4. In the grid, the NBID column is a dynamic link. When it is clicked, it displays the details of the user like firstname,lastname,emailid, etc., Is sorting not working because it is a link?
5. In addition to the above, it also displays the groups the user belongs to. This is again a grid which is sortable.
Please provide your inputs.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
1. You are using the todatasubset in two places:
local!employeeDataSubset: todatasubset(local!employees,local!pagingInfo)
and
local!userGroupsDataSubset: todatasubset(local!userGroups,local!pagingInfo)
byt the todatasubset expects an array of CDTs.
2. Therefore what you need to check is the definition of the following rules:
rule!IM_getGroupDetails(local!selectedEmployeeId),
rule!IM_getAllCIPUsers()
rule!IM_getCIPUsersCreatedWithinMonths(local!StartDate,local!EndDate)
what are they returning? Are they expression rules or query rules? if they are expression rules are you returning a CDT array? or returning ".data" or index(,"data")?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
phanibabuk
over 10 years ago
Hi,
The below rules are query rules.
rule!IM_getAllCIPUsers()
rule!IM_getCIPUsersCreatedWithinMonths(local!StartDate,local!EndDate)
rule!IM_getGroupDetails(local!selectedEmployeeId) is an expression rule that is not a CDT.
Could you please give me more inputs on how I can make sorting work?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 10 years ago
I think the problem may be this:
rule!IM_getGroupDetails(local!selectedEmployeeId)
1. what is this returning?
2. Have you tried having two separate paginginfo objects? I am not sure why if they are two different CDTs you are reusing this:
local!pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 25,sort: {field: "nbid", ascending: false}),
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>