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
+1
person also asked this
people also asked this
Replies
2 replies
Subscribers
8 subscribers
Views
2845 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Getting a cast invalid error while trying to conditionally display a standard icon indicator in a paging grid
vspravin
over 8 years ago
Hi,
I am trying to conditionally display a standard icon indicator in a 2 column paging grid by calling a!iconIndicator() inside a!documentImage() to display this icon in a grid image column. However, i get the following error instead:
Interface Definition: Expression evaluation error at function a!documentImage [line 45]: Could not cast from Rule or Function Reference to Document. Details: CastInvalidCould not cast from Rule or Function Reference to Document. Details: CastInvalid
Attached corresponding SAIL code that throws this error.
Any help to fix this issue is highly appreciated
OriginalPostID-231066
applicationDetailsGrid.txt
Discussion posts and replies are publicly visible
0
Tyler Criste
Appian Employee
over 8 years ago
I am pretty sure the problem is here:
apply(
a!documentImage(
document: if(
_,a!iconIndicator(
"PROGRESS_RUNNING"
),
a!iconIndicator(
"PROGRESS_PAUSED"
)
)
),
index(
local!dataForCurrentPage,
"isActive",
null
)
)
You can't loop over an arbitrary expression using apply(); it either needs to be a function or rule.
Could you try putting your a!documentImage expression in a rule that takes in isActive as a parameter?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vspravin
over 8 years ago
Hi Tyler Criste, Yes that was precisely the issue, i created an expression rule for a!documentImage expression that takes isActive as an input parameter and it works now perfectly. Thanks so much !!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel