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
7 subscribers
Views
1557 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I am trying to create a dynamic grid that can add lines in a form. but I am getting an error
cryan
Certified Lead Developer
over 8 years ago
I am trying to create a dynamic grid that can add lines in a form. but I am getting an error inside the call and im not sure what it is pointing me to
Interface Definition: Expression evaluation error at function a!gridLayout [line 243]: Type Validation: com.appiancorp.core.data.Dictionary cannot be cast to com.appiancorp.core.data.Record
here is the code near the error it is inside an a!gridLayout
rows: {
if(isnull(ri!OtherDocumentAnalysis_CDT),
{},
{ rows: a!applyComponents(
function: rule!SB_RowEachforegulatoryfileingform(
taskItem_cdt: ri!OtherDocumentAnalysis_CDT,
index: _
),
array: 1 + enumerate(
count(
ri!OtherDocumentAnalysis_CDT
)
)
)
}
)
...
OriginalPostID-247922
Discussion posts and replies are publicly visible
0
cryan
Certified Lead Developer
over 8 years ago
... },
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
@christhopherr I think the way you are using the rows attribute(based on code snippet mentioned in the post) might be one of the reasons that's contributing to the error being experienced by you. It might be worth trying as follows:
rows: if(
isnull(ri!OtherDocumentAnalysis_CDT),
{},
a!applyComponents()
/*Expand the applyComponents() as per the code snippet mentioned in your post*/
)
Also I believe there isn't a need to wrap the definition of if() or a!applyComponents() inside curly braces, as you are already doing that explicitly when the value is null(in case of true, {} is being returned) and implicitly in case of a!applyComponents(in case of false, this is returning a list or an array).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
reginaldm377
over 8 years ago
I think something like this for your applyComponents would serve you better.
rows: a!applyComponents(
function: rule!someFunction(someparameters)
array:if(or(isnull(local!someArray), count(local!someArray) < 1), {}, 1+ enumerate(count(local!someArray)))
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel