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
5 replies
Subscribers
7 subscribers
Views
1820 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Having issues with adding paging to a grid. There's different permissions ba
ashleyb
over 9 years ago
Having issues with adding paging to a grid. There's different permissions based off user role so the code is a little convoluted. The grid works when the batch size is -1 to show all but displays this
error when the batch size is reduced.
Expression evaluation error in rule 'apn_uisectiononecolumn' (called by rule 'apn_uireportonecolumn') at function a!gridField [line 233]:
This is line 233/234:
a!gridField(
totalCount: local!datasubset.totalCount,
Entire Code set is attached.
GridIssues.txt
OriginalPostID-162428
OriginalPostID-162428
Discussion posts and replies are publicly visible
0
Tim
Certified Lead Developer
over 9 years ago
It's quite hard to interpret your business logic for sure!
Firstly it doesn't look like your local!datasubset will always return a datasubset, I think lines 115 and 125 should be "todatasubset({})".
Does your error occur from the top or the bottom of the if() in your local!datasubset declaration?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
It also looks like the todatasubset() function isn't using the local!pagingInfo as the second input - see the documentation here:
forum.appian.com/.../Scripting_Functions.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
Could I suggest that you move the datasubset() function to outside the if() function that currently runs from line 40 to 127? That way, you just perform todatasubset on whatever data is returned according to your conditions (and it will fix the issue Tim mentions above).
Another question - what version of Appian are you using? I notice you're using notation such as local!nameFilter << rule!APN_returnFirstInput(... which is now deprecated and can be replaced using a!save().
Finally, I notice you're defining certain local variables without using the local! prefix - eg on line 75/76: with( officersIncentiveNumbers: local!delegations...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ashleyb
over 9 years ago
Thank you for the suggestions I'm working on applying those now. We're on version 7.6 currently, and most of this code has been in place for quite some time so I'm not sure what was completed on what version. I'll try the suggestions and see if I'm successful. Thanks again!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
No problem, feel free to post the code again if you're still having issues once you're done.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel